NAME

glScissor - define the scissor box

C SPECIFICATION

void ggllSScciissssoorr( GLint _x,
                GLint _y,
                GLsizei _w_i_d_t_h,
                GLsizei _h_e_i_g_h_t )

PARAMETERS

_x, _y
Specify the lower left corner of the scissor box. Initially (0, 0).
_w_i_d_t_h, _h_e_i_g_h_t
Specify the width and height of the scissor box. When a GL context is first attached to a window, _w_i_d_t_h and _h_e_i_g_h_t are set to the dimensions of that window.

DESCRIPTION

ggllSScciissssoorr defines a rectangle, called the scissor box, in window coordinates. The first two arguments, _x and _y, specify the lower left corner of the box. _w_i_d_t_h and _h_e_i_g_h_t specify the width and height of the box.

To enable and disable the scissor test, call ggllEEnnaabbllee and ggllDDiissaabbllee with argument GGLL__SSCCIISSSSOORR__TTEESSTT. 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. glScissor(0,0,1,1) aalllloowwss mmooddiiffiiccaattiioonn ooff oonnllyy tthhee lloowweerr lleefftt ppiixxeell iinn tthhee wwiinnddooww,, aanndd ggllSScciissssoorr((00,,00,,00,,00)) doesn't allow modification of any pixels in the window.

When the scissor test is disabled, it is as though the scissor box includes the entire window.

ERRORS

GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if either _w_i_d_t_h or _h_e_i_g_h_t is negative.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllSScciissssoorr is executed between the execution of ggllBBeeggiinn and the corresponding execution of ggllEEnndd.

ASSOCIATED GETS

ggllGGeett with argument GGLL__SSCCIISSSSOORR__BBOOXX
ggllIIssEEnnaabblleedd with argument GGLL__SSCCIISSSSOORR__TTEESSTT

SEE ALSO

ggllEEnnaabbllee((33GG)), ggllVViieewwppoorrtt((33GG))