cocos2d-x  3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Configuration Class Reference

Configuration contains some openGL variables. More...

#include <CCConfiguration.h>

Inheritance diagram for Configuration:
Ref

Public Member Functions

virtual ~Configuration ()
int getMaxTextureSize () const
 OpenGL Max texture size. More...
 
local getMaxTextureSize ()
 OpenGL Max texture size. More...
 
int getMaxModelviewStackDepth () const
 OpenGL Max Modelview Stack Depth. More...
 
local getMaxModelviewStackDepth ()
 OpenGL Max Modelview Stack Depth. More...
 
int getMaxTextureUnits () const
 returns the maximum texture units More...
 
local getMaxTextureUnits ()
 returns the maximum texture units More...
 
bool supportsNPOT () const
 Whether or not the GPU supports NPOT (Non Power Of Two) textures. More...
 
var supportsNPOT ()
 Whether or not the GPU supports NPOT (Non Power Of Two) textures. More...
 
local supportsNPOT ()
 Whether or not the GPU supports NPOT (Non Power Of Two) textures. More...
 
bool supportsPVRTC () const
 Whether or not PVR Texture Compressed is supported. More...
 
bool supportsETC () const
 Whether or not ETC Texture Compressed is supported. More...
 
var supportsETC ()
 Whether or not ETC Texture Compressed is supported. More...
 
local supportsETC ()
 Whether or not ETC Texture Compressed is supported. More...
 
bool supportsS3TC () const
 Whether or not S3TC Texture Compressed is supported. More...
 
local supportsS3TC ()
 Whether or not S3TC Texture Compressed is supported. More...
 
bool supportsATITC () const
 Whether or not ATITC Texture Compressed is supported. More...
 
local supportsATITC ()
 Whether or not ATITC Texture Compressed is supported. More...
 
bool supportsBGRA8888 () const
 Whether or not BGRA8888 textures are supported. More...
 
local supportsBGRA8888 ()
 Whether or not BGRA8888 textures are supported. More...
 
bool supportsDiscardFramebuffer () const
 Whether or not glDiscardFramebufferEXT is supported. More...
 
var supportsDiscardFramebuffer ()
 Whether or not glDiscardFramebufferEXT is supported. More...
 
local supportsDiscardFramebuffer ()
 Whether or not glDiscardFramebufferEXT is supported. More...
 
bool supportsShareableVAO () const
 Whether or not shareable VAOs are supported. More...
 
local supportsShareableVAO ()
 Whether or not shareable VAOs are supported. More...
 
int getMaxSupportDirLightInShader () const
 Max support directional light in shader, for Sprite3D. More...
 
local getMaxSupportDirLightInShader ()
 Max support directional light in shader, for Sprite3D. More...
 
int getMaxSupportPointLightInShader () const
 Max support point light in shader, for Sprite3D since v3.3. More...
 
local getMaxSupportPointLightInShader ()
 Max support point light in shader, for Sprite3D since v3.3. More...
 
int getMaxSupportSpotLightInShader () const
 Max support spot light in shader, for Sprite3D since v3.3. More...
 
local getMaxSupportSpotLightInShader ()
 Max support spot light in shader, for Sprite3D since v3.3. More...
 
bool checkForGLExtension (const std::string &searchName) const
 returns whether or not an OpenGL is supported More...
 
var checkForGLExtension ( var searchName)
 returns whether or not an OpenGL is supported More...
 
local checkForGLExtension ( local searchName)
 returns whether or not an OpenGL is supported More...
 
bool init ()
local init ()
const ValuegetValue (const std::string &key, const Value &defaultValue=Value::Null) const
 returns the value of a given key as a double More...
 
var getValue ( var key, var Null)
 returns the value of a given key as a double More...
 
local getValue ( local key, local Null)
 returns the value of a given key as a double More...
 
void setValue (const std::string &key, const Value &value)
 sets a new key/value pair in the configuration dictionary More...
 
std::string getInfo () const
 returns the Configuration info More...
 
var getInfo ()
 returns the Configuration info More...
 
local getInfo ()
 returns the Configuration info More...
 
void gatherGPUInfo ()
 gathers OpenGL / GPU information More...
 
local gatherGPUInfo ()
 gathers OpenGL / GPU information More...
 
void loadConfigFile (const std::string &filename)
 Loads a config file. More...
 
var loadConfigFile ( var filename)
 Loads a config file. More...
 
local loadConfigFile ( local filename)
 Loads a config file. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()

Static Public Member Functions

static ConfigurationgetInstance ()
 returns a shared instance of Configuration More...
 
static void destroyInstance ()
 purge the shared instance of Configuration More...
 
var destroyInstance ()
 purge the shared instance of Configuration More...
 
local destroyInstance ()
 purge the shared instance of Configuration More...
 
static ConfigurationsharedConfiguration ()
var sharedConfiguration ()
local sharedConfiguration ()
static void purgeConfiguration ()

Protected Attributes

GLint _maxTextureSize
var _maxTextureSize
local _maxTextureSize
GLint _maxModelviewStackDepth
var _maxModelviewStackDepth
local _maxModelviewStackDepth
bool _supportsPVRTC
var _supportsPVRTC
local _supportsPVRTC
bool _supportsETC1
var _supportsETC1
local _supportsETC1
bool _supportsS3TC
var _supportsS3TC
local _supportsS3TC
bool _supportsATITC
var _supportsATITC
local _supportsATITC
bool _supportsNPOT
var _supportsNPOT
local _supportsNPOT
bool _supportsBGRA8888
var _supportsBGRA8888
local _supportsBGRA8888
bool _supportsDiscardFramebuffer
var _supportsDiscardFramebuffer
local _supportsDiscardFramebuffer
bool _supportsShareableVAO
var _supportsShareableVAO
local _supportsShareableVAO
GLint _maxSamplesAllowed
local _maxSamplesAllowed
GLint _maxTextureUnits
local _maxTextureUnits
char * _glExtensions
var _glExtensions
local _glExtensions
int _maxDirLightInShader
var _maxDirLightInShader
local _maxDirLightInShader
int _maxPointLightInShader
local _maxPointLightInShader
int _maxSpotLightInShader
local _maxSpotLightInShader
ValueMap _valueDict
var _valueDict
local _valueDict
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
var _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Detailed Description

Configuration contains some openGL variables.

Since
v0.99.0

Constructor & Destructor Documentation

virtual ~Configuration ( )
virtual

Member Function Documentation

bool checkForGLExtension ( const std::string &  searchName) const

returns whether or not an OpenGL is supported

var checkForGLExtension ( var  searchName)

returns whether or not an OpenGL is supported

local checkForGLExtension ( local  searchName)

returns whether or not an OpenGL is supported

static void destroyInstance ( )
static

purge the shared instance of Configuration

var destroyInstance ( )
static

purge the shared instance of Configuration

local destroyInstance ( )
static

purge the shared instance of Configuration

void gatherGPUInfo ( )

gathers OpenGL / GPU information

var gatherGPUInfo ( )

gathers OpenGL / GPU information

local gatherGPUInfo ( )

gathers OpenGL / GPU information

std::string getInfo ( ) const

returns the Configuration info

var getInfo ( )

returns the Configuration info

local getInfo ( )

returns the Configuration info

static Configuration* getInstance ( )
static

returns a shared instance of Configuration

var getInstance ( )
static

returns a shared instance of Configuration

local getInstance ( )
static

returns a shared instance of Configuration

int getMaxModelviewStackDepth ( ) const

OpenGL Max Modelview Stack Depth.

var getMaxModelviewStackDepth ( )

OpenGL Max Modelview Stack Depth.

local getMaxModelviewStackDepth ( )

OpenGL Max Modelview Stack Depth.

int getMaxSupportDirLightInShader ( ) const

Max support directional light in shader, for Sprite3D.

Since
v3.3
var getMaxSupportDirLightInShader ( )

Max support directional light in shader, for Sprite3D.

Since
v3.3
local getMaxSupportDirLightInShader ( )

Max support directional light in shader, for Sprite3D.

Since
v3.3
int getMaxSupportPointLightInShader ( ) const

Max support point light in shader, for Sprite3D since v3.3.

var getMaxSupportPointLightInShader ( )

Max support point light in shader, for Sprite3D since v3.3.

local
getMaxSupportPointLightInShader
( )

Max support point light in shader, for Sprite3D since v3.3.

int getMaxSupportSpotLightInShader ( ) const

Max support spot light in shader, for Sprite3D since v3.3.

var getMaxSupportSpotLightInShader ( )

Max support spot light in shader, for Sprite3D since v3.3.

local
getMaxSupportSpotLightInShader
( )

Max support spot light in shader, for Sprite3D since v3.3.

int getMaxTextureSize ( ) const

OpenGL Max texture size.

var getMaxTextureSize ( )

OpenGL Max texture size.

local getMaxTextureSize ( )

OpenGL Max texture size.

int getMaxTextureUnits ( ) const

returns the maximum texture units

Since
v2.0.0
var getMaxTextureUnits ( )

returns the maximum texture units

Since
v2.0.0
local getMaxTextureUnits ( )

returns the maximum texture units

Since
v2.0.0
const Value& getValue ( const std::string &  key,
const Value defaultValue = Value::Null 
) const

returns the value of a given key as a double

var getValue ( var  key,
var  defaultValue = Value::Null 
)

returns the value of a given key as a double

local getValue ( local  key,
local  defaultValue = Value::Null 
)

returns the value of a given key as a double

bool init ( )
var init ( )
local init ( )
void loadConfigFile ( const std::string &  filename)

Loads a config file.

If the keys are already present, then they are going to be replaced. Otherwise the new keys are added.

var loadConfigFile ( var  filename)

Loads a config file.

If the keys are already present, then they are going to be replaced. Otherwise the new keys are added.

local loadConfigFile ( local  filename)

Loads a config file.

If the keys are already present, then they are going to be replaced. Otherwise the new keys are added.

static void purgeConfiguration ( )
static
var purgeConfiguration ( )
static
local purgeConfiguration ( )
static
void setValue ( const std::string &  key,
const Value value 
)

sets a new key/value pair in the configuration dictionary

var setValue ( var  key,
var  value 
)

sets a new key/value pair in the configuration dictionary

local setValue ( local  key,
local  value 
)

sets a new key/value pair in the configuration dictionary

static Configuration*
sharedConfiguration
( )
static
var sharedConfiguration ( )
static
local sharedConfiguration ( )
static
bool supportsATITC ( ) const

Whether or not ATITC Texture Compressed is supported.

var supportsATITC ( )

Whether or not ATITC Texture Compressed is supported.

local supportsATITC ( )

Whether or not ATITC Texture Compressed is supported.

bool supportsBGRA8888 ( ) const

Whether or not BGRA8888 textures are supported.

Since
v0.99.2
var supportsBGRA8888 ( )

Whether or not BGRA8888 textures are supported.

Since
v0.99.2
local supportsBGRA8888 ( )

Whether or not BGRA8888 textures are supported.

Since
v0.99.2
bool supportsDiscardFramebuffer ( ) const

Whether or not glDiscardFramebufferEXT is supported.

Since
v0.99.2
var supportsDiscardFramebuffer ( )

Whether or not glDiscardFramebufferEXT is supported.

Since
v0.99.2
local supportsDiscardFramebuffer ( )

Whether or not glDiscardFramebufferEXT is supported.

Since
v0.99.2
bool supportsETC ( ) const

Whether or not ETC Texture Compressed is supported.

var supportsETC ( )

Whether or not ETC Texture Compressed is supported.

local supportsETC ( )

Whether or not ETC Texture Compressed is supported.

bool supportsNPOT ( ) const

Whether or not the GPU supports NPOT (Non Power Of Two) textures.

OpenGL ES 2.0 already supports NPOT (iOS).

Since
v0.99.2
var supportsNPOT ( )

Whether or not the GPU supports NPOT (Non Power Of Two) textures.

OpenGL ES 2.0 already supports NPOT (iOS).

Since
v0.99.2
local supportsNPOT ( )

Whether or not the GPU supports NPOT (Non Power Of Two) textures.

OpenGL ES 2.0 already supports NPOT (iOS).

Since
v0.99.2
bool supportsPVRTC ( ) const

Whether or not PVR Texture Compressed is supported.

var supportsPVRTC ( )

Whether or not PVR Texture Compressed is supported.

local supportsPVRTC ( )

Whether or not PVR Texture Compressed is supported.

bool supportsS3TC ( ) const

Whether or not S3TC Texture Compressed is supported.

var supportsS3TC ( )

Whether or not S3TC Texture Compressed is supported.

local supportsS3TC ( )

Whether or not S3TC Texture Compressed is supported.

bool supportsShareableVAO ( ) const

Whether or not shareable VAOs are supported.

Since
v2.0.0
var supportsShareableVAO ( )

Whether or not shareable VAOs are supported.

Since
v2.0.0
local supportsShareableVAO ( )

Whether or not shareable VAOs are supported.

Since
v2.0.0

Member Data Documentation

char* _glExtensions
protected
var _glExtensions
protected
local _glExtensions
protected
int _maxDirLightInShader
protected
var _maxDirLightInShader
protected
local _maxDirLightInShader
protected
GLint _maxModelviewStackDepth
protected
var _maxModelviewStackDepth
protected
local _maxModelviewStackDepth
protected
int _maxPointLightInShader
protected
var _maxPointLightInShader
protected
local _maxPointLightInShader
protected
GLint _maxSamplesAllowed
protected
var _maxSamplesAllowed
protected
local _maxSamplesAllowed
protected
int _maxSpotLightInShader
protected
var _maxSpotLightInShader
protected
local _maxSpotLightInShader
protected
GLint _maxTextureSize
protected
var _maxTextureSize
protected
local _maxTextureSize
protected
GLint _maxTextureUnits
protected
var _maxTextureUnits
protected
local _maxTextureUnits
protected
bool _supportsATITC
protected
var _supportsATITC
protected
local _supportsATITC
protected
bool _supportsBGRA8888
protected
var _supportsBGRA8888
protected
local _supportsBGRA8888
protected
bool _supportsDiscardFramebuffer
protected
var _supportsDiscardFramebuffer
protected
local _supportsDiscardFramebuffer
protected
bool _supportsETC1
protected
var _supportsETC1
protected
local _supportsETC1
protected
bool _supportsNPOT
protected
var _supportsNPOT
protected
local _supportsNPOT
protected
bool _supportsPVRTC
protected
var _supportsPVRTC
protected
local _supportsPVRTC
protected
bool _supportsS3TC
protected
var _supportsS3TC
protected
local _supportsS3TC
protected
bool _supportsShareableVAO
protected
var _supportsShareableVAO
protected
local _supportsShareableVAO
protected
ValueMap _valueDict
protected
var _valueDict
protected
local _valueDict
protected

The documentation for this class was generated from the following file: