PDA

View Full Version : offscreen buffers?



hoshi55
03-10-2004, 02:01 PM
hi

i want to grab the framebuffer from my openGL application and save it to a bitmap file. to get the framebuffer contents i use glReadPixels(). the only problem is that whenever there is a window partially obscuring my openGL window, nothing is drawn in the obscured area so my bitmap file looks rather incomplete.
so, is it possible to tell openGL to render to the whole window no matter how much of it is visible? or can i render to an offscreen buffer and grab that instead?

oh yes, i'm using windows XP

thanks
hoshi55

dorbie
03-10-2004, 08:39 PM
You must render to an offscreen buffer to guarantee this.

Relic
03-10-2004, 10:26 PM
More precisely a P-buffer, because back buffers are offscreen, too, but pixel ownership testing affects all buffers (including depth and stencil) associated to a rendering context.