COLOR READ TYPE and FORMAT

Hi everyone,





I’m working with the OpenGL ES2.0 SDK.





I’m trying to figure out what types and formats are supported for reading pixels from the FBO using the following lines:








GLint readType, readFormat;


     


glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE, &readType);


glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &readFormat);








Surprisingly, both calls return the same value, readType and readFormat are 0x1401 (GL_UNSIGNED_BYTE ).





I would expect readFormat to be one of the pixel formats defined in gl2.h: {GL_DEPTH_COMPONENT, GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, GL_LUMINANCE_ALPHA}.





Any idea what causes such a behavior?





Hi.





Is this issue regarding PC Emulation (PVRVFrame), or is it on a specific device?

Hi Arron,





Thanks for the quick response








The issue is with the PC Emulator PVRVFrame.

Hi.





We have discovered an issue with the latest version of PVRVFrame regarding your issue.





Do you call the provided code with a bound FBO? Or is it called when no FBO/the default colour buffer is bound?Arron2011-11-28 13:01:44

Hi,





The problem is observed both for the system provided frame buffer and for the user generated FBO.

I thought it might be.


As a work around for now, you can assume that GL_IMPLEMENTATION_COLOR_READ_FORMAT returns GL_BGRA_IMG on PowerVR SGX hardware. We also found that calling GL_IMPLEMENTATION_COLOR_READ_TYPE had issues too, but in most cases this would return GL_UNSIGNED_BYTE.





I filed bug: BRN35154 on our internal tracker and you should be able to reference this ID in the release notes of our next SDK for further details.





Many thanks.