PDA

View Full Version : How to scroll back buffer?



What1
10-11-2003, 10:21 AM
Hello!

I need to scroll back buffer, i.e. to copy pixels from one rect to another in the same buffer and the rects can overlap.

I can't use glCopyPixels, because pixels are always copied in row order from the lowest to the highest row, left to right in each row and if the rects overlap the result is incorrect.

Walrus Momentum
10-11-2003, 12:49 PM
You'll need an intermediate buffer to store the rectangle-to-be-copied. This could be a texture, but if all you need is a blit then a buffer region might be faster (see http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_buffer_region.txt ).

BTW, this question is probably more appropriate in the beginner's forum (http://www.opengl.org/discussion_boards/cgi_directory/forumdisplay.cgi?action=topics&number=2&start=here) .

What1
10-11-2003, 11:44 PM
Thank you for reply. I'l try to use WGL_BUFFER_REGION and measure it perfomance.
Is it possible to scroll back buffer with only one blit and without time-expensive operations?(e.g. in DirectX7 it is)