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屬性的獲取方法。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章