Faster expose events!!

Right now, when I get an expose event, I just redraw my whole scene. Unfortunately, this is often a VERY expensive operation. I would like to somehow magically speed this up - I experimented a while ago with copying just the rectangle that was exposed from the back buffer to the front (after drawing the back buffer, of course), but it was slow as molasses (which is why I redraw the whole scene - it’s faster). Is there some way that I can copy the contents (whole or in part) of a buffer into another one quickly? Or does anyone have any other suggestions?


What you’re looking for is the WGL_ARB_buffer-region extension (previously KTX_buffer_region). It’s widely supported on most hardware I’ve seen. Check out the spec here:

Can’t be windows specific… I need it to work on Linux/Irix …any other ideas?


I browsed the extension registry a bit and came up with the following alternatives under linux:
MESA_copy_sub_buffer is designed to do exactly what you want to. I don’t know how fast it is though, or whether it’s supported by IHV’s under linux. The other alternative is pbuffers which are supported under windows. I don’t know what the situation is with linux, but there’s an equivalent to wgl pbuffers called GLX_SGIX_pbuffers. You can check out the spec to the extensions her:

[This message has been edited by harsman (edited 06-19-2001).]