Buffer copying ?

Hi everyone. I’m trying to create a ‘paint’ style application that I need to overlay coordinate information onto. I’m currently drawing to the back buffer, and swapping buffers every 16ms (it’s for a touchscreen demonstration). The back buffer doesn’t get cleared…ever, because it’s constantly being updated with new information. Can someone please point me in the right direction on the best way to overlay my coordinate info, I would be very grateful. My current thoughts are to render all drawing to AUX1, copy AUX1 to the back buffer, render my coordinate info there, then swap buffers. Is this the best way of doing it (and where do I even begin to do that ? lol) - Thanks.

No, that’s definitely painful.

Use “Framebuffer Objects” (FBOs). An extension to do proper render-to-texture. See here.

If you have never used extension before, get glew.

Searching for “framebuffer object” should give you several tutorials that explain how to use it. Once you understood it, it is really easy.

Hope that helps,

Cool, will look up framebuffer object now and let you know how I get on. Thanks Jan for the pointer.