'\" t .\" Title: glViewport .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 05/21/2015 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLVIEWPORT" "3G" "05/21/2015" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glViewport \- set the viewport .SH "C SPECIFICATION" .HP \w'void\ glViewport('u .BI "void glViewport(GLint\ " "x" ", GLint\ " "y" ", GLsizei\ " "width" ", GLsizei\ " "height" ");" .SH "PARAMETERS" .PP \fIx\fR, \fIy\fR .RS 4 Specify the lower left corner of the viewport rectangle, in pixels\&. The initial value is (0,0)\&. .RE .PP \fIwidth\fR, \fIheight\fR .RS 4 Specify the width and height of the viewport\&. When a GL context is first attached to a window, \fIwidth\fR and \fIheight\fR are set to the dimensions of that window\&. .RE .SH "DESCRIPTION" .PP \fBglViewport\fR specifies the affine transformation of x and y from normalized device coordinates to window coordinates\&. Let x nd y nd be normalized device coordinates\&. Then the window coordinates x w y w are computed as follows: .PP x w = x nd + 1 ⁢ width 2 + x .PP y w = y nd + 1 ⁢ height 2 + y .PP Viewport width and height are silently clamped to a range that depends on the implementation\&. To query this range, call \fBglGet\fR() with argument \fBGL_MAX_VIEWPORT_DIMS\fR\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\fR is generated if either \fIwidth\fR or \fIheight\fR is negative\&. .SH "ASSOCIATED GETS" .PP \fBglGet\fR() with argument \fBGL_VIEWPORT\fR .PP \fBglGet\fR() with argument \fBGL_MAX_VIEWPORT_DIMS\fR .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .T& l c c c c c c c c c c c c. T{ \fBglViewport\fR T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp .SH "SEE ALSO" .PP \fBglDepthRange\fR() .SH "COPYRIGHT" .PP Copyright \(co 1991\-2006 Silicon Graphics, Inc\&. Copyright \(co 2010\-2014 Khronos Group\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 1991-2006 Silicon Graphics, Inc. .br Copyright \(co 2010-2014 Khronos Group .br