GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of GLVIEWPORT

GLVIEWPORT

Index
 

NAME

glViewport - set the viewport

 

C SPECIFICATION

void f3glViewportfP( GLint fIxfP,
f2xfP, f2yfP
Specify the lower left corner of the viewport rectangle,
in pixels. The initial value is (0,0).
f2widthfP, f2heightfP
Specify the width and height of the viewport. When a GL context is first attached to a window, f2widthfP and f2heightfP are set to the dimensions of that window.
 

DESCRIPTION

%f3glViewportfP specifies the affine transformation of $x$ and $y$ from normalized device coordinates to window coordinates. Let ($x sub nd$, $y sub nd$) be normalized device coordinates. Then the window coordinates ($x sub w$, $y sub w$) are computed as follows:


x sub w ~=~ ( x sub nd ~+~ 1 ) left ( "width" over 2 right ) ~+~ "x"


y sub w ~=~ ( y sub nd ~+~ 1 ) left ( "height" over 2 right ) ~+~ "y" Viewport width and height are silently clamped to a range that depends on the implementation. To query this range, call %f3glGetfP with argument %f3GL_MAX_VIEWPORT_DIMSfP.  

ERRORS

%f3GL_INVALID_VALUEfP is generated if either f2widthfP or f2heightfP is negative. %f3GL_INVALID_OPERATIONfP is generated if %f3glViewportfP is executed between the execution of %f3glBeginfP and the corresponding execution of %f3glEndfP.  

ASSOCIATED GETS

%f3glGetfP with argument %f3GL_VIEWPORTfP
%f3glGetfP with argument %f3GL_MAX_VIEWPORT_DIMSfP  

SEE ALSO

%f3glDepthRange(3G)fP


 

Index

NAME
C SPECIFICATION
DESCRIPTION
ERRORS
ASSOCIATED GETS
SEE ALSO