Configuration contains some openGL variables. More...
#include <CCConfiguration.h>
Public Member Functions | |
virtual | ~Configuration () |
Destructor. More... | |
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... | |
bool | supportsPVRTC () const |
Whether or not PVR Texture Compressed is supported. More... | |
bool | supportsETC () const |
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... | |
bool | supportsShareableVAO () const |
Whether or not shareable VAOs are supported. More... | |
int | getMaxSupportDirLightInShader () const |
Max support directional light in shader, for Sprite3D. More... | |
int | getMaxSupportPointLightInShader () const |
Max support point light in shader, for Sprite3D. More... | |
int | getMaxSupportSpotLightInShader () const |
Max support spot light in shader, for Sprite3D. More... | |
local | getMaxSupportSpotLightInShader () |
Max support spot light in shader, for Sprite3D. More... | |
bool | checkForGLExtension (const std::string &searchName) const |
Returns whether or not an OpenGL is supported. More... | |
bool | init () |
Initialize method. More... | |
const Value & | getValue (const std::string &key, const Value &defaultValue=Value::Null) const |
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... | |
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... | |
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... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. More... | |
Static Public Member Functions | |
static Configuration * | getInstance () |
Returns a shared instance of Configuration. More... | |
local | getInstance () |
Returns a shared instance of Configuration. More... | |
static void | destroyInstance () |
Purge the shared instance of Configuration. More... | |
local | destroyInstance () |
Purge the shared instance of Configuration. More... | |
static Configuration * | sharedConfiguration () |
local | sharedConfiguration () |
static void | purgeConfiguration () |
Protected Attributes | |
GLint | _maxTextureSize |
local | _maxTextureSize |
GLint | _maxModelviewStackDepth |
local | _maxModelviewStackDepth |
bool | _supportsPVRTC |
local | _supportsPVRTC |
bool | _supportsETC1 |
local | _supportsETC1 |
bool | _supportsS3TC |
local | _supportsS3TC |
bool | _supportsATITC |
local | _supportsATITC |
bool | _supportsNPOT |
local | _supportsNPOT |
bool | _supportsBGRA8888 |
local | _supportsBGRA8888 |
bool | _supportsDiscardFramebuffer |
local | _supportsDiscardFramebuffer |
bool | _supportsShareableVAO |
local | _supportsShareableVAO |
GLint | _maxSamplesAllowed |
local | _maxSamplesAllowed |
GLint | _maxTextureUnits |
local | _maxTextureUnits |
char * | _glExtensions |
local | _glExtensions |
int | _maxDirLightInShader |
local | _maxDirLightInShader |
int | _maxPointLightInShader |
local | _maxPointLightInShader |
int | _maxSpotLightInShader |
local | _maxSpotLightInShader |
ValueMap | _valueDict |
local | _valueDict |
Protected Attributes inherited from Ref | |
unsigned int | _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... | |
Configuration contains some openGL variables.
|
virtual |
Destructor.
bool checkForGLExtension | ( | const std::string & | searchName | ) | const |
Returns whether or not an OpenGL is supported.
searchName | A given search name. |
local checkForGLExtension | ( | local | searchName | ) |
Returns whether or not an OpenGL is supported.
searchName | A given search name. |
|
static |
Purge the shared instance of Configuration.
|
static |
Purge the shared instance of Configuration.
void gatherGPUInfo | ( | ) |
Gathers OpenGL / GPU information.
local gatherGPUInfo | ( | ) |
Gathers OpenGL / GPU information.
std::string getInfo | ( | ) | const |
Returns the Configuration info.
local getInfo | ( | ) |
Returns the Configuration info.
|
static |
Returns a shared instance of Configuration.
|
static |
Returns a shared instance of Configuration.
int getMaxModelviewStackDepth | ( | ) | const |
OpenGL Max Modelview Stack Depth.
local getMaxModelviewStackDepth | ( | ) |
OpenGL Max Modelview Stack Depth.
int getMaxSupportDirLightInShader | ( | ) | const |
Max support directional light in shader, for Sprite3D.
local getMaxSupportDirLightInShader | ( | ) |
Max support directional light in shader, for Sprite3D.
int getMaxSupportPointLightInShader | ( | ) | const |
Max support point light in shader, for Sprite3D.
local getMaxSupportPointLightInShader |
( | ) |
Max support point light in shader, for Sprite3D.
int getMaxSupportSpotLightInShader | ( | ) | const |
Max support spot light in shader, for Sprite3D.
local getMaxSupportSpotLightInShader |
( | ) |
Max support spot light in shader, for Sprite3D.
int getMaxTextureSize | ( | ) | const |
OpenGL Max texture size.
local getMaxTextureSize | ( | ) |
OpenGL Max texture size.
int getMaxTextureUnits | ( | ) | const |
Returns the maximum texture units.
local getMaxTextureUnits | ( | ) |
Returns the maximum texture units.
const Value& getValue | ( | const std::string & | key, |
const Value & | defaultValue = Value::Null |
||
) | const |
Returns the value of a given key as a double.
key | A given key. |
defaultValue | if not find the value, return the defaultValue. |
local getValue | ( | local | key, |
local | defaultValue = Value::Null |
||
) |
Returns the value of a given key as a double.
key | A given key. |
defaultValue | if not find the value, return the defaultValue. |
bool init | ( | ) |
Initialize method.
local init | ( | ) |
Initialize method.
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.
filename | Config file name. |
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.
filename | Config file name. |
|
static |
|
static |
void setValue | ( | const std::string & | key, |
const Value & | value | ||
) |
Sets a new key/value pair in the configuration dictionary.
key | A given key. |
value | A given value. |
local setValue | ( | local | key, |
local | value | ||
) |
Sets a new key/value pair in the configuration dictionary.
key | A given key. |
value | A given value. |
|
static |
|
static |
bool supportsATITC | ( | ) | const |
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.
local supportsBGRA8888 | ( | ) |
Whether or not BGRA8888 textures are supported.
bool supportsDiscardFramebuffer | ( | ) | const |
Whether or not glDiscardFramebufferEXT is supported.
local supportsDiscardFramebuffer | ( | ) |
Whether or not glDiscardFramebufferEXT is supported.
bool supportsETC | ( | ) | const |
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).
local supportsNPOT | ( | ) |
Whether or not the GPU supports NPOT (Non Power Of Two) textures.
OpenGL ES 2.0 already supports NPOT (iOS).
bool supportsPVRTC | ( | ) | const |
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.
local supportsS3TC | ( | ) |
Whether or not S3TC Texture Compressed is supported.
bool supportsShareableVAO | ( | ) | const |
Whether or not shareable VAOs are supported.
local supportsShareableVAO | ( | ) |
Whether or not shareable VAOs are supported.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |