PDA

View Full Version : Interior Clipping



tsewell
12-13-2002, 01:43 AM
Is there any way to do interior clipping in Ortho Mode? I'd like to only render to the edges of the window and not waste precious video memory on the untouched interior of the window.

The only pseudo-method I am aware of is to use four windows (ie one for top, bottom, left, and right edges). But I'd like to avoid this overhead if it's possible in hardware.

Any ideas?

Relic
12-13-2002, 04:40 AM
If I'm understanding this correctly "precious video memory" means you'd like to save fillrate and need a negative scissor.
There's none in OpenGL. You either need to specify the four border regions as individual scissor rects and draw the geometry four times, or mask the interior rectangle with a stencil or depth buffer test. If the geometry is complex, the latter is faster.

tsewell
12-13-2002, 10:57 AM
Cool, thanks for the help.

weston