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

CCConfiguration contains some openGL variables. More...

#include <CCConfiguration.h>

Inheritance diagram for CCConfiguration:
CCObject CCCopying

Public Member Functions

virtual ~CCConfiguration (void)
int getMaxTextureSize (void) const
 OpenGL Max texture size. More...
 
var getMaxTextureSize ()
 OpenGL Max texture size. More...
 
local getMaxTextureSize ()
 OpenGL Max texture size. More...
 
int getMaxModelviewStackDepth (void) const
 OpenGL Max Modelview Stack Depth. More...
 
local getMaxModelviewStackDepth ()
 OpenGL Max Modelview Stack Depth. More...
 
int getMaxTextureUnits (void) const
 returns the maximum texture units More...
 
local getMaxTextureUnits ()
 returns the maximum texture units More...
 
bool supportsNPOT (void) const
 Whether or not the GPU supports NPOT (Non Power Of Two) textures. More...
 
bool supportsPVRTC (void) const
 Whether or not PVR Texture Compressed is supported. More...
 
bool supportsBGRA8888 (void) const
 Whether or not BGRA8888 textures are supported. More...
 
local supportsBGRA8888 ()
 Whether or not BGRA8888 textures are supported. More...
 
bool supportsDiscardFramebuffer (void) 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 (void) const
 Whether or not shareable VAOs are supported. More...
 
local supportsShareableVAO ()
 Whether or not shareable VAOs are supported. More...
 
bool checkForGLExtension (const std::string &searchName) const
 returns whether or not an OpenGL is supported More...
 
local checkForGLExtension ( local searchName)
 returns whether or not an OpenGL is supported More...
 
bool init (void)
local init ()
const char * getCString (const char *key, const char *default_value=NULL) const
 returns the value of a given key as a string. More...
 
bool getBool (const char *key, bool default_value=false) const
 returns the value of a given key as a boolean. More...
 
double getNumber (const char *key, double default_value=0.0) const
 returns the value of a given key as a double. More...
 
local getNumber ( local key, local 0)
 returns the value of a given key as a double. More...
 
CCObjectgetObject (const char *key) const
 returns the value of a given key as a double More...
 
local getObject ( local key)
 returns the value of a given key as a double More...
 
void setObject (const char *key, CCObject *value)
 sets a new key/value pair in the configuration dictionary More...
 
var setObject ( var key, var value)
 sets a new key/value pair in the configuration dictionary More...
 
local setObject ( local key, local value)
 sets a new key/value pair in the configuration dictionary More...
 
void dumpInfo (void) const
 dumps the current configuration on the console More...
 
void gatherGPUInfo (void)
 gathers OpenGL / GPU information More...
 
local gatherGPUInfo ()
 gathers OpenGL / GPU information More...
 
void loadConfigFile (const char *filename)
 Loads a config file. More...
 
- Public Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (void)
bool isSingleReference (void) const
unsigned int retainCount (void) const
virtual bool isEqual (const CCObject *pObject)
virtual void acceptVisitor (CCDataVisitor &visitor)
virtual void update (float dt)
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)

Static Public Member Functions

static CCConfigurationsharedConfiguration (void)
 returns a shared instance of CCConfiguration More...
 
local sharedConfiguration ()
 returns a shared instance of CCConfiguration More...
 
static void purgeConfiguration (void)
 purge the shared instance of CCConfiguration More...
 
var purgeConfiguration ()
 purge the shared instance of CCConfiguration More...
 
local purgeConfiguration ()
 purge the shared instance of CCConfiguration More...
 

Protected Attributes

GLint m_nMaxTextureSize
var m_nMaxTextureSize
local m_nMaxTextureSize
GLint m_nMaxModelviewStackDepth
local m_nMaxModelviewStackDepth
bool m_bSupportsPVRTC
local m_bSupportsPVRTC
bool m_bSupportsNPOT
var m_bSupportsNPOT
local m_bSupportsNPOT
bool m_bSupportsBGRA8888
var m_bSupportsBGRA8888
local m_bSupportsBGRA8888
bool m_bSupportsDiscardFramebuffer
var m_bSupportsDiscardFramebuffer
local m_bSupportsDiscardFramebuffer
bool m_bSupportsShareableVAO
var m_bSupportsShareableVAO
local m_bSupportsShareableVAO
GLint m_nMaxSamplesAllowed
local m_nMaxSamplesAllowed
GLint m_nMaxTextureUnits
local m_nMaxTextureUnits
char * m_pGlExtensions
var m_pGlExtensions
local m_pGlExtensions
CCDictionarym_pValueDict
var m_pValueDict
local m_pValueDict
- Protected Attributes inherited from CCObject
unsigned int m_uReference
unsigned int m_uAutoReleaseCount

Additional Inherited Members

- Public Attributes inherited from CCObject
unsigned int m_uID
int m_nLuaID

Detailed Description

CCConfiguration contains some openGL variables.

Since
v0.99.0

Constructor & Destructor Documentation

virtual ~CCConfiguration ( void  )
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

void dumpInfo ( void  ) const

dumps the current configuration on the console

var dumpInfo (   )

dumps the current configuration on the console

local dumpInfo (   )

dumps the current configuration on the console

void gatherGPUInfo ( void  )

gathers OpenGL / GPU information

var gatherGPUInfo (   )

gathers OpenGL / GPU information

local gatherGPUInfo (   )

gathers OpenGL / GPU information

bool getBool ( const char *  key,
bool  default_value = false 
) const

returns the value of a given key as a boolean.

If the key is not found, it will return the default value

var getBool ( var  key,
var  default_value = false 
)

returns the value of a given key as a boolean.

If the key is not found, it will return the default value

local getBool ( local  key,
local  default_value = false 
)

returns the value of a given key as a boolean.

If the key is not found, it will return the default value

const char* getCString ( const char *  key,
const char *  default_value = NULL 
) const

returns the value of a given key as a string.

If the key is not found, it will return the default value

var getCString ( var  key,
var  default_value = NULL 
)

returns the value of a given key as a string.

If the key is not found, it will return the default value

local getCString ( local  key,
local  default_value = NULL 
)

returns the value of a given key as a string.

If the key is not found, it will return the default value

int getMaxModelviewStackDepth ( void  ) const

OpenGL Max Modelview Stack Depth.

var getMaxModelviewStackDepth (   )

OpenGL Max Modelview Stack Depth.

local getMaxModelviewStackDepth (   )

OpenGL Max Modelview Stack Depth.

int getMaxTextureSize ( void  ) const

OpenGL Max texture size.

var getMaxTextureSize (   )

OpenGL Max texture size.

local getMaxTextureSize (   )

OpenGL Max texture size.

int getMaxTextureUnits ( void  ) 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
double getNumber ( const char *  key,
double  default_value = 0.0 
) const

returns the value of a given key as a double.

If the key is not found, it will return the default value

var getNumber ( var  key,
var  default_value = 0.0 
)

returns the value of a given key as a double.

If the key is not found, it will return the default value

local getNumber ( local  key,
local  default_value = 0.0 
)

returns the value of a given key as a double.

If the key is not found, it will return the default value

CCObject* getObject ( const char *  key) const

returns the value of a given key as a double

var getObject ( var  key)

returns the value of a given key as a double

local getObject ( local  key)

returns the value of a given key as a double

bool init ( void  )
var init (   )
local init (   )
void loadConfigFile ( const char *  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 ( void  )
static

purge the shared instance of CCConfiguration

var purgeConfiguration (   )
static

purge the shared instance of CCConfiguration

local purgeConfiguration (   )
static

purge the shared instance of CCConfiguration

void setObject ( const char *  key,
CCObject value 
)

sets a new key/value pair in the configuration dictionary

var setObject ( var  key,
var  value 
)

sets a new key/value pair in the configuration dictionary

local setObject ( local  key,
local  value 
)

sets a new key/value pair in the configuration dictionary

static CCConfiguration*
sharedConfiguration
( void  )
static

returns a shared instance of CCConfiguration

var sharedConfiguration (   )
static

returns a shared instance of CCConfiguration

local sharedConfiguration (   )
static

returns a shared instance of CCConfiguration

bool supportsBGRA8888 ( void  ) 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 ( void  ) 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 supportsNPOT ( void  ) 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 ( void  ) 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 supportsShareableVAO ( void  ) 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

bool m_bSupportsBGRA8888
protected
var m_bSupportsBGRA8888
protected
local m_bSupportsBGRA8888
protected
bool m_bSupportsDiscardFramebuffer
protected
var m_bSupportsDiscardFramebuffer
protected
local m_bSupportsDiscardFramebuffer
protected
bool m_bSupportsNPOT
protected
var m_bSupportsNPOT
protected
local m_bSupportsNPOT
protected
bool m_bSupportsPVRTC
protected
var m_bSupportsPVRTC
protected
local m_bSupportsPVRTC
protected
bool m_bSupportsShareableVAO
protected
var m_bSupportsShareableVAO
protected
local m_bSupportsShareableVAO
protected
GLint m_nMaxModelviewStackDepth
protected
var m_nMaxModelviewStackDepth
protected
local m_nMaxModelviewStackDepth
protected
GLint m_nMaxSamplesAllowed
protected
var m_nMaxSamplesAllowed
protected
local m_nMaxSamplesAllowed
protected
GLint m_nMaxTextureSize
protected
var m_nMaxTextureSize
protected
local m_nMaxTextureSize
protected
GLint m_nMaxTextureUnits
protected
var m_nMaxTextureUnits
protected
local m_nMaxTextureUnits
protected
char* m_pGlExtensions
protected
var m_pGlExtensions
protected
local m_pGlExtensions
protected
CCDictionary* m_pValueDict
protected
var m_pValueDict
protected
local m_pValueDict
protected

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