PDA

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



toxnico
12-05-2006, 12:47 AM
Hello,

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,

Nico

k_szczech
12-05-2006, 02: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.