PDA

View Full Version : Clearing the window



J.Warrick
06-02-2000, 02:22 AM
Is it possible to "clear" just a portion of the window? I'm trying to have my viewport
(cleared in black) smaller than my window.
(ltgray background). The clearing covers the entire window, not just the viewport. I've tried glScissors, with the box the same size as my viewport, but that produces some ugly vertical flashing. Thanks for the help!

Humus
06-02-2000, 06:11 AM
Just draw a black rectangle over the region you want to clear.

Bob
06-03-2000, 03:56 AM
Or you can set a new viewport, and use glClear(), then you can clear all buffers you want, with any value you want.

J.Warrick
06-03-2000, 07:20 AM
Humus, I tried your tip and it worked just fine! Thanks, I just love simple solutions.
Bob, thanks for the suggestion, but I'm a bit confused on the extra viewport idea. (Sorry, I'm a opengl newbie) When you have a sec, could you explain?
J.Warrick