Window will not re-draw!

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

hey ash, you might find this interesting:
http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_buffer_region.txt

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!

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 … :slight_smile: