OpenGL C bindings library: libGL.a
void glScissor(GLint X, GLint Y, GLsizei Width, GLsizei Height)
When the scissor test is disabled, it is as though the scissor box includes the entire window.
The glScissor subroutine 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. The Width and Height parameters specify the width and height of the box.
The scissor test is enabled and disabled with the glEnable and glDisable subroutines with the GL_SCISSOR_TEST argument. While the scissor 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, so glScissor(0,0,1,1) allows only the lower left pixel in the window to be modified, and glScissor(0,0,0,0) disallows modification to all pixels in the window.
GL_INVALID_VALUE | Width or Height is negative. |
GL_INVALID_OPERATION | The glScissor subroutine is called between a call to glBegin and the corresponding call to glEnd. |
Associated gets for the glScissor subroutine are as follows. (See the glGet subroutine for more information.)
glGet with argument GL_SCISSOR_BOX
glIsEnabled with argument GL_SCISSOR_TEST.
/usr/include/GL/gl.h | Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
The glBegin or glEnd subroutine, glEnable or glDisable subroutine, glViewport subroutine.