70 lines
2.0 KiB
Plaintext
70 lines
2.0 KiB
Plaintext
|
'\" e
|
||
|
'\"! eqn | mmdoc
|
||
|
'\"macro stdmacro
|
||
|
.ds Vn Version 1.2
|
||
|
.ds Dt 24 September 1999
|
||
|
.ds Re Release 1.2.1
|
||
|
.ds Dp Jan 14 18:30
|
||
|
.ds Dm 01 scissor.g
|
||
|
.ds Xs 30565 4 scissor.gl
|
||
|
.TH GLSCISSOR 3G
|
||
|
.SH NAME
|
||
|
.B "glScissor
|
||
|
\- define the scissor box
|
||
|
|
||
|
.SH C SPECIFICATION
|
||
|
void \f3glScissor\fP(
|
||
|
GLint \fIx\fP,
|
||
|
.nf
|
||
|
.ta \w'\f3void \fPglScissor( 'u
|
||
|
GLint \fIy\fP,
|
||
|
GLsizei \fIwidth\fP,
|
||
|
GLsizei \fIheight\fP )
|
||
|
.fi
|
||
|
|
||
|
.SH PARAMETERS
|
||
|
.TP \w'\f2x\fP\ \f2y\fP\ \ 'u
|
||
|
\f2x\fP, \f2y\fP
|
||
|
Specify the lower left corner of the scissor box.
|
||
|
Initially (0, 0).
|
||
|
.TP
|
||
|
\f2width\fP, \f2height\fP
|
||
|
Specify the width and height of the scissor box.
|
||
|
When a GL context is first attached to a window,
|
||
|
\f2width\fP and \f2height\fP are set to the dimensions of that window.
|
||
|
.SH DESCRIPTION
|
||
|
\%\f3glScissor\fP defines a rectangle, called the scissor box,
|
||
|
in window coordinates.
|
||
|
The first two arguments,
|
||
|
\f2x\fP and \f2y\fP,
|
||
|
specify the lower left corner of the box.
|
||
|
\f2width\fP and \f2height\fP specify the width and height of the box.
|
||
|
.P
|
||
|
To enable and disable the scissor test, call
|
||
|
\%\f3glEnable\fP and \%\f3glDisable\fP with argument
|
||
|
\%\f3GL_SCISSOR_TEST\fP. The test is initially disabled.
|
||
|
While the test is enabled, only pixels that lie within the scissor box
|
||
|
can be modified by drawing commands.
|
||
|
Window coordinates have integer values at the shared corners of
|
||
|
frame buffer pixels.
|
||
|
\f7glScissor(0,0,1,1)\fP allows modification of only the lower left
|
||
|
pixel in the window, and \f7glScissor(0,0,0,0)\fP doesn't allow
|
||
|
modification of any pixels in the window.
|
||
|
.P
|
||
|
When the scissor test is disabled,
|
||
|
it is as though the scissor box includes the entire window.
|
||
|
.SH ERRORS
|
||
|
\%\f3GL_INVALID_VALUE\fP is generated if either \f2width\fP or \f2height\fP is negative.
|
||
|
.P
|
||
|
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glScissor\fP
|
||
|
is executed between the execution of \%\f3glBegin\fP
|
||
|
and the corresponding execution of \%\f3glEnd\fP.
|
||
|
.bp
|
||
|
.SH ASSOCIATED GETS
|
||
|
\%\f3glGet\fP with argument \%\f3GL_SCISSOR_BOX\fP
|
||
|
.br
|
||
|
\%\f3glIsEnabled\fP with argument \%\f3GL_SCISSOR_TEST\fP
|
||
|
.SH SEE ALSO
|
||
|
\%\f3glEnable(3G)\fP,
|
||
|
\%\f3glViewport(3G)\fP
|