Using glReadBuffer/glReadPixels returns black image instead of the actual image only on Intel cards
Posted
by
cloudraven
on Game Development
See other posts from Game Development
or by cloudraven
Published on 2012-10-01T04:03:59Z
Indexed on
2012/10/08
9:48 UTC
Read the original article
Hit count: 270
I have this piece of code
glReadBuffer( GL_FRONT );
glReadPixels( 0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, buffer );
Which works just perfectly in all the Nvidia and AMD GPUs I have tried, but it fails in almost every single Intel built-in video that I have tried. It actually works in a very old 945GME, but fails in all the others. Instead of getting a screenshot I am actually getting a black screen.
If it helps, I am working with the Doom3 Engine, and that code is derived from the built-in screen capture code. By the way, even with the original game I cannot do screen capture on those intel devices anyway. My guess is that they are not implementing the standard correctly or something. Is there a workaround for this?
© Game Development or respective owner