cocos2dx Configuration类

官方给的类说明是 Configuration contains some openGL variables。意思是Configuration包含了一些openGL易变的东西。

查看类内容之后发现,Configuration正如它的名字一样,提供的是一些配置信息。具体如下。

/** OpenGL Max texture size. */

int getMaxTextureSize() const;


/** OpenGL Max Modelview Stack Depth. */

int getMaxModelviewStackDepth() const;


/** returns the maximum texture units

@since v2.0.0

*/

int getMaxTextureUnits() 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

*/

bool supportsNPOT() const;


/** Whether or not PVR Texture Compressed is supported */

bool supportsPVRTC() const;

/** Whether or not ETC Texture Compressed is supported */

bool supportsETC() const;

/** Whether or not S3TC Texture Compressed is supported */

bool supportsS3TC() const;

/** Whether or not ATITC Texture Compressed is supported */

bool supportsATITC() const;

/** Whether or not BGRA8888 textures are supported.

@since v0.99.2

*/

bool supportsBGRA8888() const;


/** Whether or not glDiscardFramebufferEXT is supported

@since v0.99.2

*/

bool supportsDiscardFramebuffer() const;


/** Whether or not shareable VAOs are supported.

@since v2.0.0

*/

bool supportsShareableVAO() const;

/** Max support directional light in shader,for Sprite3D

@since v3.3

*/

int getMaxSupportDirLightInShader() const;

/** Max support point light in shader,for Sprite3D

*since v3.3

*/

int getMaxSupportPointLightInShader() const;

/** Max support spot light in shader,for Sprite3D

*since v3.3

*/

int getMaxSupportSpotLightInShader() const;


/** returns whether or not an OpenGL is supported */

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


提供了一些openGL属性的获取方法。

相关文章

    本文实践自 RayWenderlich、Ali Hafizji 的文章《...
Cocos-code-ide使用入门学习地点:杭州滨江邮箱:appdevzw@1...
第一次開始用手游引擎挺激动!!!进入正题。下载资源1:从C...
    Cocos2d-x是一款强大的基于OpenGLES的跨平台游戏开发...
1.  来源 QuickV3sample项目中的2048样例游戏,以及最近《...
   Cocos2d-x3.x已经支持使用CMake来进行构建了,这里尝试...