PDA

View Full Version : ppm image generation



dummy_24
02-08-2004, 11:37 PM
i use glReadPixel(..) to read the frame buffer and then write the contents to a file and save as .ppm. when i view it i just see no image. also the saved file just contains only 1's. why is this?

ZbuffeR
02-09-2004, 02:04 AM
Are you sure the GL window is not covered/obscured by other windows during glReadPixel() ? Sure that you don't glClear just before reading ? Sure that you read from the right buffer ? Sure the reading format is correct (ie. float vs bytes etc) ?

[This message has been edited by ZbuffeR (edited 02-09-2004).]