PDA

View Full Version : clearing the color buffer



nk
05-31-2004, 04:13 AM
I have a viewport(let's say glViewPort(100,100,300,400)) that is smaller then the size of the context device(a window with 800 height,900 width). When I call glClear(GL_COLOR_BUFFER_BIT..), the entire context device is cleared; is there any possibility to specify to OGL to clear only the viewport zone?
Thanks.

mikael_aronsson
05-31-2004, 06:16 AM
Hi !

You can use glScissor() to set the area that glClear should have any effect on.

Mikael