Re: cumulative rendering
| Newsgroups | gmane.games.devel.opengl |
|---|---|
| Organization | Fat City Network Services, San Diego, California |
| Message-ID | <[email protected]> |
> 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!) Ok, I have found out that a single-buffered GLUT setup works in OS X when I use glFlush() instead of glutSwapBuffers(). But what will happen if my window is overlapped by another window? I will try and see what happens. >> 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. Ok, this seems a robust way to solve my problem. The question is if this mechanism is actually faster than rendering the complete image each frame. My image is computed (and stored) in main memory, and does not depend on OpenGL functionality at all (to generate it at least). I found out that glDrawPixels() is the fastest way to render, faster than updating a texture and rendering a textured quad. The updated pixels are usually spread out over the image, so it is not possible to restrict the update to a small area... I thought: why not render only the changed pixels via GL_POINTS? Seems an interesting optimization anyway. Thanks, Erwin Driessens Driessens & Verstappen www.xs4all.nl/~notnot ----- FAQ and OpenGL Resources at: http://www.geocities.com/SiliconValley/Hills/9956/OpenGL -- Author: 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).