View Full Version : How to redraw only a region of a viewport?

12-04-2006, 11:47 PM

For OpenGL optimization I have to refresh only some parts of a GL context (when a window is moving on it for example). This is to avoid a full redraw of the context. This can be done using GLScissor, but I have to define the rectangle I want to repaint.

Is there a mean (signal or something) with OpenGL, to know at any time what screen region(x,y,width, height) has to be refreshed?

I'm using MS Windows, C++ and QT library.

Thanks for your help,


12-05-2006, 01:11 AM
It's up to Windows or QT to give you that region during WM_PAINT command. OpenGL is for rendering, not for window management.