【问题标题】:Texture2D: Error uploading compressed texture level: 0. glError: 0x0500Texture2D:上传压缩纹理级别时出错:0。glError:0x0500
【发布时间】:2014-12-18 09:51:45
【问题描述】:

我创建了我添加的新项目:

 Size winSize = Director::getInstance()->getWinSize();
  RenderTexture* pRenderTexture  = RenderTexture::create(winSize.width, winSize.height, Texture2D::PixelFormat::BGRA8888); 

我不断收到此错误:

cocos2d: Texture2D: Error uploading compressed texture level: 0 . glError: 0x0500
Assert failed: Could not attach texture to framebuffer
Assertion failed!

顺便说一句,cpp-test RenderTexture 示例确实有效。 我在这里做错了什么?

使用:

  • cocos2d-x v3.3
  • win7 32位

【问题讨论】:

    标签: c++ windows cocos2d-x cocos2d-x-3.0


    【解决方案1】:

    这意味着你的opengl不支持BGRA8888。如果适合您,请使用 RGBA8888。 你有错字:

    RenderTexture* pRenderTexture; = RenderTexture::create
    _____________________________^
    

    【讨论】:

    • 这是我修复原始代码时的错误
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-10-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多