OpenGL C bindings library: libGL.a
void glViewport(GLint X, GLint Y, GLsizei Width, GLsizei Height)
The glViewport subroutine specifies the affine transformation of X and Y from normalized device coordinates to window coordinates. Let (Xnd, Ynd) be normalized device coordinates. Then the window coordinates (Xw, Yw) are computed as follows:
Viewport width and height are silently clamped to a range that depends on the implementation. This range is queried by calling the glGet subroutine with the GL_MAX_VIEWPORT_DIMS argument.
GL_INVALID_VALUE | Width or Height is negative. |
GL_INVALID_OPERATION | The glViewport subroutine is called between a call to glBegin and the corresponding call to glEnd. |
Associated gets for the glViewport subroutine are as follows. (See the glGet subroutine for more information.)
glGet with argument GL_VIEWPORT
glGet with argument GL_MAX_VIEWPORT_DIMS.
/usr/include/GL/gl.h | Contains C language constants, variable type definitions, and ANSI function prototypes for OpenGL. |
The glBegin or glEnd subroutine, glDepthRange subroutine.