View Full Version : Faster expose events!!
06-18-2001, 08:35 AM
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?
06-18-2001, 08:56 AM
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: http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_buffer_region.txt
06-18-2001, 10:33 AM
Can't be windows specific... I need it to work on Linux/Irix ...any other ideas?
06-19-2001, 02:16 AM
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: http://oss.sgi.com/projects/ogl-sample/registry/MESA/copy_sub_buffer.txt
[This message has been edited by harsman (edited 06-19-2001).]
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.