PDA

View Full Version : effect of obscuring/minimizing window on buffers



therealremi
03-31-2009, 03:28 PM
I couldn't find anywhere in the official specification of OpenGL functions what effect does obscuring or minimizing a window have on front and back buffers. Can this cause the pixels in the buffers to not match the drawing commands issued by my application? Is there any difference in the behaviour between front and back buffer? I would expect that the content of the back buffer shouldn't be affected by such events but are there any guarantees? Is that platform specific?

ZbuffeR
03-31-2009, 04:20 PM
Search "pixel ownership rule" in the spec.
Basically any non-visible pixel in both front and back buffer are undefined. Undefined means that sometimes they can stay untouched, but this will be very fragile and dangerous to rely on.
Use an FBO instead if you want to guarantee long term conservation of an offscreen framebuffer.

therealremi
04-01-2009, 03:26 AM
Damn, FBOs are more difficult to set up...

ZbuffeR
04-01-2009, 06:28 AM
You can do it old school way, doing a manual copy to texture of the current framebuffer. This will only work if you are able to do the copy before minimize/cover happens.

http://www.opengl.org/sdk/docs/man/xhtml/glCopyTexSubImage2D.xml