Front or Back buffer problem

Hello,

What I am trying to do is reshape a window into a region created from a bitmap. I can create the region fine, but it seems I have a buffering issue.

For each frame, I draw to the backbuffer, I get the pixels using readpixels,

then I swapbuffers, then I shape the window with the region created from the pixel map.

It seems that the region is made from what was previously in the back buffer.I mean, what is displayed is 1 frame behind the region shape.

Anyone have any ideas, I posted this in the beginner forum, but didnt get much feedback.

Bumby

[This message has been edited by bumby (edited 05-08-2003).]

>> then I shape the window with the region created from the pixel map.<<

You might want to explain that precisely first.

might want to do glReadBuffer(GL_BACK)
make sure your not reading the front
buffer.