iOS using GL_RGBA8
Is there a way to use GL_RGBA8 on the iPhone/iPad? My textures show up as blank when I try to use GL_RGBA8_OES instead. GL_RGBA is causing prob开发者_开发技巧lem when using transparency.
I haven't tried it on the real device, only in the simulator.
GL_RGBA8 is for the render buffer. See http://www.khronos.org/registry/gles/extensions/OES/OES_rgb8_rgba8.txt.
To get 8-bit RGBA textures, when calling glTexImage2D use GL_RGBA as the format and GL_UNSIGNED_BYTE as the type.
If you have problems with transparency not appearing, make sure GL_BLEND is enabled, make sure that glBlendFunc is being used to set up the blending properly, and (for GLES 1.x) double check that the glTexEnv settings are correct. I think that's everything relevant...
加载中,请稍侯......
精彩评论