cocos2dx Configuration类

本文详细介绍了OpenGL配置类中包含的各项属性及其获取方法,包括纹理大小限制、非2的幂次支持、压缩纹理支持等,有助于开发者更好地理解并利用这些配置进行高效渲染。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

官方给的类说明是 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属性的获取方法。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值