Triple buffering

Started by
3 comments, last by vbbartlett 22 years, 8 months ago
Background: I have a scene rendered in the back buffer that doesn''t change that often but is complex and expensive to recreate. Thus i don''t clear the backbuffer but rather just SwapBuffer, and then paint in the FrontBuffer to keep it intact. Then i read in a .bmp file and display it using glDrawPixels to the front buffer (so as not to damage the back buffer) but causing flicker. This acts ... in a way like a cursor. Thus its position changes often and must be redrawn constantly. Question: Is there any way to create triple buffering or at least 2 different buffers, one for the background and one for the .bmp and then combine those two in the backbuffer to prevent flicker? While in the process not damaging the background and recreating the .bmp?
Advertisement
Use texture layers instead: copy your complex scene image to a texture, and your bmp file to another. Now you can redraw them both every frame, it''s just 2 quads. If you want to preserve the zbuffer, then you should mask writes to it.
How do i copy the scene to a texture? The scene is created from my display list (not a openGL list) composed of thousands of lines and polygons.
Can a transparent overlay plane be used? If so are overlays implemented in software or hardware? Im developing for Win2k and Sun Solaris, are overlay planes implemented on both platforms? How do i actually implement an overlay plane? I haven''t seen any code that would give me an idea if it is possible or how to even begin... Just saw them mentioned and if I could implemnt using them, it would solve this problem
perfect for this is the winbufferregion extension, example on my site

This topic is closed to new replies.

Advertisement