Writing to then reading from an offscreen FBO on iPhone; works on simulator but not on device?

此生再无相见时 提交于 2019-12-05 01:31:38
Toby Allen

As Andrew answered himself:

The answer, was that the bitmap format should be GL_RGBA, not GL_BGRA

// works on simulator with GL_BGRA, but not on device
glReadPixels(0, 0, renderBufferWidth,
             renderBufferHeight,
             GL_RGBA, // <--
             GL_UNSIGNED_BYTE, bufferData);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!