   Clear image instead of clear color?
  Is there a way that I can use the previous frame as the background instead of a color? I want to start with the previous frame and treat it as the background, so anywhere that I do not draw would show the previous frame. Is this even possible without editing a texture every frame? 
  If you want the previous frame as a background, just don''t clear the colour buffer.  ;  Yeah, just clear the depth buffer and render the picture at the far clip of an orthogonal projection, then switch to perspective and continue as normal. ;quote:Original post by benjamin bunny  If you want the previous frame as a background, just don''t clear the colour buffer.    That is not a good solution when using double buffered rendering, as the content of the back buffer after a buffer swap is undefined. ;quote:Original post by Brother Bob  quote:Original post by benjamin bunny   If you want the previous frame as a background, just don''t clear the colour buffer.    That is not a good solution when using double buffered rendering, as the content of the back buffer after a buffer swap is undefined.   In Direct3D, you can force the backbuffer to stay.Given that this is OpenGL, though, that''s not quite possible. Best option might actually be to render to texture, draw a single textured quad on screen as your scene each frame, and basically do that the whole time. ;quote:Original post by Brother Bob   quote:Original post by benjamin bunny    If you want the previous frame as a background, just don't clear the colour buffer.    That is not a good solution when using double buffered rendering, as the content of the back buffer after a buffer swap is undefined.   True. I guess the alternatives are to use glCopyTexImage2D and copy the screenbuffer to a texture, or render it to a texture directly (with a pbuffer) like promit said. I suppose you could also use the accumulation buffer if there's hw support.   [edited by - benjamin bunny on February 5, 2004 9:49:47 PM];  Oh, one thing I forgot to mention; my suggestion of rendering to texture is going to eat twice as much fill as a normal render. Just keep that in mind. ;  You can force the back buffer to stay: look into the WGL_SWAP_COPY flag. 