Re: cumulative rendering
"Stephen J Baker" <[email protected]>
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
[email protected] wrote: > A single buffered GL context seems ideal for this, but sadly this won't > work on OS X using glut... A glutSwapBuffers() seems necessary to make > the rendering visible on screen. On Linux and MS Windows, this works fine. You can't (legally) use a double-buffered context because OpenGL does not guarantee that the previous frame's content will still be there after a buffer swap. It might work on some cards in some situations - but you can't rely on that. To do this properly, you need to run single-buffered. I believe GLUT supports that - but don't call glutSwapBuffers - use glFinish() instead. (I'm a little hazy on this one - it's been a lot of years since I last used GLUT with single-buffering!) > So I have chosen a double-buffered context, and it turns out that the > back buffer is identical to the front buffer after swapping, which is > exactly what I need. But according to the GL spec, this is not > guaranteed, but depends on the driver and swapping mode in use. Yeah - you definitely can't rely on that - either in theory or in practice. > Is it possible to use glCopyPixels() to copy the front buffer to the > back buffer after a swap? No - because your window might be overlapped (in which case part of the front buffer will have been trashed by the other window) - or the graphics card may have done processing on the back buffer as it swapped it into the front buffer (eg for antialiasing). However, you could copy your back buffer into a texture map before you swapped - then copy the texture into the new back buffer afterwards. ----------------------------------------------------------------------- The second law of Frisbee throwing states: "Never precede any maneuver by a comment more predictive than "Watch this!"...it turns out that this also applies to writing Fragment Shaders. ----------------------------------------------------------------------- Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: [email protected] http://www.link.com Home: [email protected] http://www.sjbaker.org ----- FAQ and OpenGL Resources at: http://www.geocities.com/SiliconValley/Hills/9956/OpenGL -- Author: Stephen J Baker INET: [email protected] Fat City Hosting, San Diego, California -- http://www.fatcity.com --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [email protected] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).