PDA

View Full Version : Clear color buffer with stencil test?



atnak
05-16-2003, 10:25 AM
Hi,

Is there something like an equivalent of DepthRange(1,1) that I can use to clear a portion of the colour buffer while I draw an arbitary object? I can't just change the colour to the clear colour(black) because glColor() calls are interweaved throughout the object drawing routine.

If there isn't, I'm thinking I could mark out the object with the stencil buffer then draw a black quad that covers the entire viewport. In this case, how do I know what to make the vertexes of the quad? Could there be a performance issue in drawing a quad that covers the entire viewport?