View Full Version : glReadPixels
03-04-2004, 11:50 AM
Im reading the pixels with glReadPixels and the bitmap is all gray...
Any idea why?
03-04-2004, 10:38 PM
Need more info than this.
I have had the same problem and it was due to read from the wrong buffer. If you are running with doublebuffering I found the following scheme to work
glReadBuffer( GL_BACK );
//w_ is width of window, same for h_
glReadPixels( 0 , 0 , w_ , h_ , GL_RGB ,GL_UNSIGNED_BYTE , (GLvoid*) pixels);
my problem was that i made the grab after I swapped buffers which just gave me a blank picture.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.