我在项目中用到CCRenderTexture的CCRenderTexture::create(size.width,size.height, kCCTexture2DPixelFormat_RGBA8888, GL_DEPTH24_STENCIL8);创建对象时 在部分电脑触发了断言 CCAssert(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE, “Could not attach texture to framebuffer”);
但如果我用CCRenderTexture::create(size.width,size.height);那就可以顺利创建。望大神帮忙解答。
cocos2d.x.version: cocos2d-x 2.2.5
cocos2d.x.compiled_with_profiler: false
cocos2d.x.compiled_with_gl_state_cache: true
cocos2d.x.fps: 60
cocos2d.x.display_fps: 1
cocos2d.x.gl.projection: 3d
cocos2d.x.texture.pixel_format_for_png: rgba8888
cocos2d.x.texture.pvrv2_has_alpha_premultiplied: 0
gl.vendor: Intel
gl.renderer: Intel(R) G41 Express Chipset
gl.version: 2.1.0 - Build 8.15.10.2869
gl.max_texture_size: 4096
gl.max_texture_units: 16
gl.supports_PVRTC: false
gl.supports_NPOT: true
gl.supports_BGRA8888: false
gl.supports_discard_framebuffer: false
gl.supports_vertex_array_object: true
附上机器的一些信息吧
看一下机器配置,貌似不支持RGBA8888啊楼主
不是的 不支持的是BGRA8888 和RGBA8888是不同的