1GLVIEWPORT(3G)                  [FIXME: manual]                 GLVIEWPORT(3G)
2
3
4

NAME

6       glViewport - set the viewport
7

C SPECIFICATION

9       void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
10

PARAMETERS

12       x, y
13           Specify the lower left corner of the viewport rectangle, in pixels.
14           The initial value is (0,0).
15
16       width, height
17           Specify the width and height of the viewport. When a GL context is
18           first attached to a window, width and height are set to the
19           dimensions of that window.
20

DESCRIPTION

22       glViewport specifies the affine transformation of x and y from
23       normalized device coordinates to window coordinates. Let x nd y nd be
24       normalized device coordinates. Then the window coordinates x w y w are
25       computed as follows:
26
27       x w = x nd + 1 ⁢ width 2 + x
28
29       y w = y nd + 1 ⁢ height 2 + y
30
31       Viewport width and height are silently clamped to a range that depends
32       on the implementation. To query this range, call glGet() with argument
33       GL_MAX_VIEWPORT_DIMS.
34

ERRORS

36       GL_INVALID_VALUE is generated if either width or height is negative.
37

ASSOCIATED GETS

39       glGet() with argument GL_VIEWPORT
40
41       glGet() with argument GL_MAX_VIEWPORT_DIMS
42

VERSION SUPPORT

44       ┌───────────┬───────────────────────────────────────────────────────────────────────┐
45       │           │                OpenGL Version                                         
46       ├───────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
47Function   2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 
48/          │     │     │     │     │     │     │     │     │     │     │     │     │
49Feature    │     │     │     │     │     │     │     │     │     │     │     │     │
50Name       │     │     │     │     │     │     │     │     │     │     │     │     │
51       ├───────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
52glViewport │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
53       └───────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
54

SEE ALSO

56       glDepthRange()
57
59       Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
60       Khronos Group. This document is licensed under the SGI Free Software B
61       License. For details, see http://oss.sgi.com/projects/FreeB/.
62
64       Copyright © 1991-2006 Silicon Graphics, Inc.
65       Copyright © 2010-2014 Khronos Group
66
67
68
69[FIXME: source]                   03/06/2019                    GLVIEWPORT(3G)
Impressum