PDA

View Full Version : Window will not re-draw!



A5H
09-29-2004, 01:35 PM
Hello,

I have a program in which I open a file, perform lots of calculations, and then render a bunch(1,000s) of rectangles on the screen in different colors.
I am using GLUT to manage the window and event systems.

The problem is that I don't want the program to have to execute all these draw commands over again everytime something covers the window or it is minimized. I've been searching around for a faster method.

I tried saving the buffer, using glReadPixels, and then writing that array of pixels back whenever the display callback is called, using glDrawPixels.
But that seems to be problematic, and is not working when I minimize and maximize the window.

Sorry for the newbie question, thanks for any help!

-Adam

09-29-2004, 05:14 PM
hey ash, you might find this interesting:
http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_buffer_region.txt

A5H
10-01-2004, 11:36 AM
Hey that's cool, and might be just what i'm looking for.

I've never heard of these ARB extensions before, but if they're not too hard to get running, hopefully I can use them.

Thanks for the help!

10-01-2004, 01:33 PM
hey a5h, i've never used that extension myself, but it seems like it's just what you need. maybe someone has some code they could post. i wouldn't mind seeing it in action myself. or, if you manage to get it working, maybe you would be kind enough ... :)