Refresh only latest

Hi guys. Hope to get some help on this one.

I need to display quadrics. The quantity of the quadrics I display increase as I get more new cursor positions.

To do so, I use a FOR loop to display the latest quadric reflecting the latest cursor position, as well as all those before it.

Is there any way I can display only the latest quadric yet do not lose those already on screen? ie those already displayed stay on screen.

Thanx a million! Happy hols!

sure, simple dont clear anything, but remember to draw changes for two frames else you will get some flickering, because swapbuffer dont copy imagedata from backbuffer to frontbuffer (it swaps them !!!)…

or if you want parts on screen been cleared use render to texture …

[This message has been edited by T2k (edited 12-24-2001).]

The behaviour of SwapBuffers is not explicitly defined. It can swap or it can copy or anything else. And that’s not all. The back buffer is not even guarateed to contain the old image after a swap/copy. The driver is free to fill it with noise/garbage if it likes to.

I would suggest you draw to the front buffer directly. That way you don’t have to mess with swapping buffers, making sure the correct image is there, or anything. Once drawn to the front buffer, it will be on the window until you clear the front buffer.

Do this by either creating a single buffered application, or if you have double buffers, use glDrawBuffer(GL_FRONT). Then you will draw directly to the front buffer (the window).