PDA

View Full Version : Clearing part of the screen?



Cheps
03-30-2006, 09:48 AM
Hello,

I'm looking for the best way to clean part of the screen. My scene is restricted to the bottom left corner of the screen, as I have menus top and right that almost never change, and that I don't want to redraw every frame.

The problem is, glClear() ignores the current viewport. I've tryed as well with the stencil buffer, but it's ignored as well, all the screen gets cleared.

Shall I just paint a black polygon that totaly cover my scene? Or turn manualy every pixel of my viewport in the framebuffer to black?

Thanks for any advice :)

memfr0b
03-30-2006, 09:56 AM
You can use the scissor test to limit the area affected by glClear.

Cheps
03-31-2006, 01:00 AM
That's exactly what I was looking for, thanks!