View Full Version : Buffers

Claus Dybdal
04-10-2004, 08:46 AM
Hi Guys,

I want to display a plane in 3D on top of a rendered 3D image. I have dobb buffers. I tryed this:

1. Render the 3D image to GL_BACK
2. Draw to GL_FRONT a plane, it displays OK
3. Swapbuffers to erase the plane and get a new copy of the 3D
4. Draw a plane at a new position in GL_FRONT and it works.

It works, but only if the plane is not in the same position in 3D - otherwise nothing is displayed unless i re-render the 3D in GL_BACK.

I'm sure it's simple, but i can't figur it out based on "OpenGL Programming Guide".

Can anybody give me a hint?


Claus cd@scantech.com

04-10-2004, 11:57 AM
I'm not sure that I understand what it is your trying to do. You want to render a 2D overlay on top of your 3D image?

04-10-2004, 01:10 PM
The contents of the back buffer are undefined after SwapBuffers. You can't guarentee that a swap is just a swap; it could be a copy or an actual swap.