gDPSetScissor.3p 1.88 KB
.TH gDPSetScissor 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
gDPSetScissor, gsDPSetScissor
\- set scissor box in screen coordinates.
.SH C SPECIFICATION
.nf
\f3#include "gbi.h"

gDPSetScissor(Gfx *gdl,
		unsigned int mode,
		unsigned int ulx,
		unsigned int uly,
		unsigned int lrx,
		unsigned int lry )

gsDPSetScissor(unsigned int mode,
		unsigned int ulx,
		unsigned int uly,
		unsigned int lrx,
		unsigned int lry )
\fP
.fi
.SH PARAMETERS
.TP 10
.I *gdl
graphics display list pointer.
.TP
.I mode
Interlace modes.
\f3G_SC_NON_INTERLACE, G_SC_ODD_INTERLACE, G_SC_EVEN_INTERLACE\fP
.TP
.I ulx, uly, lrx, lry
Screen coordinates for the upper-left and lower right corner.
.SH DESCRIPTION
The scissor box eliminates pixels drawn outside of the box region.
.PP
The RSP graphics microcode performs fixed point precision clipping which
can result in small precision errors, causing primitives to be
slightly off of the viewport rectangle.  A typical application would
set the viewport region slightly larger than the scissor region in
order to eliminate these artifacts.
.PP
Scissoring can also be used to eliminate a majority of the clipping
computation all together.  You can tell the RSP to clip in a region
larger than visible screen, in which case the off screen pixels must
be scissored (which is often faster).
.PP
This command also eliminates scanlines when rendering in interlaced
video mode.  In non interlaced mode, all scanlines are drawn.  In
interlaced mode, the application can specify whether even or odd
scanlines are eliminated.  This allows a single framebuffer to be used
to store the images for the two fields of an interlaced display mode.
.SH NOTE
Scissoring only works for one and two cycle types.
The scissor box must be larger than or equal to the rectangle region in fill or copy mode.
.SH SEE ALSO
.IR gSPViewport (3P)
.IR gSPClipRatio (3P)
.IR gDPFillRectangle (3P)
.IR gSPTextureRectangle (3P)