1GLSCISSOR(3G)                                                    GLSCISSOR(3G)
2
3
4

NAME

6       glScissor - define the scissor box
7
8

C SPECIFICATION

10       void glScissor( GLint x,
11                       GLint y,
12                       GLsizei width,
13                       GLsizei height )
14
15

PARAMETERS

17       x, y Specify  the  lower left corner of the scissor box.  Initially (0,
18            0).
19
20       width, height
21            Specify the width and height of the scissor box.  When a  GL  con‐
22            text  is  first  attached to a window, width and height are set to
23            the dimensions of that window.
24

DESCRIPTION

26       glScissor defines a rectangle, called the scissor box, in window  coor‐
27       dinates.  The first two arguments, x and y, specify the lower left cor‐
28       ner of the box.  width and height specify the width and height  of  the
29       box.
30
31       To  enable  and  disable  the scissor test, call glEnable and glDisable
32       with argument GL_SCISSOR_TEST. The test is initially  disabled.   While
33       the test is enabled, only pixels that lie within the scissor box can be
34       modified by drawing commands.  Window coordinates have  integer  values
35       at  the  shared  corners  of  frame  buffer pixels.  glScissor(0,0,1,1)
36       allows modification of only the lower left pixel  in  the  window,  and
37       glScissor(0,0,0,0) doesn't allow modification of any pixels in the win‐
38       dow.
39
40       When the scissor test is disabled, it is  as  though  the  scissor  box
41       includes the entire window.
42

ERRORS

44       GL_INVALID_VALUE is generated if either width or height is negative.
45
46       GL_INVALID_OPERATION  is generated if glScissor is executed between the
47       execution of glBegin and the corresponding execution of glEnd.
48

ASSOCIATED GETS

50       glGet with argument GL_SCISSOR_BOX
51       glIsEnabled with argument GL_SCISSOR_TEST
52

SEE ALSO

54       glEnable(3G), glViewport(3G)
55
56
57
58                                                                 GLSCISSOR(3G)
Impressum