cocos2d-x  2.2.3-gd2.113-rev1ec524e
Loading...
Searching...
No Matches
CCConfiguration Class Reference

CCConfiguration contains some openGL variables. More...

#include <CCConfiguration.h>

Inheritance diagram for CCConfiguration:
[legend]
Collaboration diagram for CCConfiguration:
[legend]

Public Member Functions

virtual ~CCConfiguration (void)
 NA NA. More...
 
int getMaxTextureSize (void) const
 OpenGL Max texture size. More...
 
int getMaxModelviewStackDepth (void) const
 OpenGL Max Modelview Stack Depth. More...
 
int getMaxTextureUnits (void) const
 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...
 
bool supportsDiscardFramebuffer (void) const
 Whether or not glDiscardFramebufferEXT is supported. More...
 
bool supportsShareableVAO (void) const
 Whether or not shareable VAOs are supported. More...
 
bool checkForGLExtension (const std::string &searchName) const
 returns whether or not an OpenGL is supported More...
 
bool init (void)
 
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...
 
CCObjectgetObject (const char *key) const
 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...
 
void dumpInfo (void) const
 dumps the current configuration on the console More...
 
void gatherGPUInfo (void)
 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)
 NA. More...
 
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)
 
 CCObject (const CCObject &)
 
CCObjectoperator= (const CCObject &)
 
virtual void encodeWithCoder (DS_Dictionary *)
 
virtual bool canEncode ()
 
CCObjectType getObjType () const
 
virtual int getTag () const
 
virtual void setTag (int nTag)
 
void setObjType (CCObjectType)
 
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)
 

Static Public Member Functions

static CCConfigurationsharedConfiguration (void)
 returns a shared instance of CCConfiguration More...
 
static void purgeConfiguration (void)
 purge the shared instance of CCConfiguration More...
 
- Static Public Member Functions inherited from CCObject
static CCObjectcreateWithCoder (DS_Dictionary *)
 

Protected Attributes

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

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

◆ ~CCConfiguration()

virtual ~CCConfiguration ( void  )
virtual

NA NA.

Member Function Documentation

◆ checkForGLExtension()

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

returns whether or not an OpenGL is supported

◆ dumpInfo()

void dumpInfo ( void  ) const

dumps the current configuration on the console

◆ gatherGPUInfo()

void gatherGPUInfo ( void  )

gathers OpenGL / GPU information

◆ getBool()

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

◆ getCString()

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

◆ getMaxModelviewStackDepth()

int getMaxModelviewStackDepth ( void  ) const

OpenGL Max Modelview Stack Depth.

◆ getMaxTextureSize()

int getMaxTextureSize ( void  ) const

OpenGL Max texture size.

◆ getMaxTextureUnits()

int getMaxTextureUnits ( void  ) const

returns the maximum texture units

Since
v2.0.0

◆ getNumber()

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

◆ getObject()

CCObject * getObject ( const char *  key) const

returns the value of a given key as a double

◆ init()

bool init ( void  )

◆ loadConfigFile()

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.

◆ purgeConfiguration()

static void purgeConfiguration ( void  )
static

purge the shared instance of CCConfiguration

◆ setObject()

void setObject ( const char *  key,
CCObject value 
)

sets a new key/value pair in the configuration dictionary

◆ sharedConfiguration()

static CCConfiguration * sharedConfiguration ( void  )
static

returns a shared instance of CCConfiguration

◆ supportsBGRA8888()

bool supportsBGRA8888 ( void  ) const

Whether or not BGRA8888 textures are supported.

Since
v0.99.2

◆ supportsDiscardFramebuffer()

bool supportsDiscardFramebuffer ( void  ) const

Whether or not glDiscardFramebufferEXT is supported.

Since
v0.99.2

◆ supportsNPOT()

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

◆ supportsPVRTC()

bool supportsPVRTC ( void  ) const

Whether or not PVR Texture Compressed is supported.

◆ supportsShareableVAO()

bool supportsShareableVAO ( void  ) const

Whether or not shareable VAOs are supported.

Since
v2.0.0

Member Data Documentation

◆ m_bSupportsBGRA8888

bool m_bSupportsBGRA8888
protected

◆ m_bSupportsDiscardFramebuffer

bool m_bSupportsDiscardFramebuffer
protected

◆ m_bSupportsNPOT

bool m_bSupportsNPOT
protected

◆ m_bSupportsPVRTC

bool m_bSupportsPVRTC
protected

◆ m_bSupportsShareableVAO

bool m_bSupportsShareableVAO
protected

◆ m_nMaxModelviewStackDepth

GLint m_nMaxModelviewStackDepth
protected

◆ m_nMaxSamplesAllowed

GLint m_nMaxSamplesAllowed
protected

◆ m_nMaxTextureSize

GLint m_nMaxTextureSize
protected

◆ m_nMaxTextureUnits

GLint m_nMaxTextureUnits
protected

◆ m_pGlExtensions

char* m_pGlExtensions
protected

◆ m_pValueDict

CCDictionary* m_pValueDict
protected

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