tags:

views:

62

answers:

1

I'm making a drawing application with WINAPI and OpenGL. To make things more efficient I only redraw the region needed so I invalidateRect(hwnd,myRect,false). I know OpenGL does self clipping but I want to do that for my rect. I want it to clip itself for the region I invalidated to make things even more efficient. Thanks

A: 

If i understood correctly, what you want is the scissor test. Enable it with glEnable(GL_SCISSOR_TEST); and set the scissor rectangle wih glScissor(x, y, width, height);

Matias Valdenegro