I need an answer to this!
I'm trying to read current viewport:
glReadPixels(0, 0, size.x, size.y, GL_RGB, GL_UNSIGNED_BYTE, pBits);
All of the args to glReadPixels are valid. However, I'm not getting anything - nothing (!!) - into the allocated pBits buffer. Have tried every possible format: GL_RGBA, GL_BGR_EXT, GL_BGRA_EXT, GL_COLOR_INDEX but no luck.
My system video is set up for 16-bit color, i.e. 16 bits per pixel. Can glReadPixel handle that format? If OpenGL can render to the screen OK, it should be able to read the pixel color info back without problems.
Re: glReadPixels problem
How do you know that nothing is written to the buffer? What do you do after the above code?