gpt4 book ai didi

c++ - Texture2D : Error uploading compressed texture level: 0. glError: 0x0500

转载 作者:行者123 更新时间:2023-11-28 06:31:07 28 4
gpt4 key购买 nike

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

 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位

最佳答案

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

RenderTexture* pRenderTexture; = RenderTexture::create
_____________________________^

关于c++ - Texture2D : Error uploading compressed texture level: 0. glError: 0x0500,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27543654/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com