GLVIEWPORT(3G)
π GLVIEWPORT(3G) β glViewport: set the viewport π
okay bestie, this is the 3G manual page for glViewport, and the headerβs manual tag is [FIXME: manual] β yes, still a FIXME, we love a work in progress π letβs get into it. β¨
β¨ NAME β¨
glViewport β set the viewport π
π§ C SPECIFICATION π
void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
πΈ PARAMETERS πΈ
x,yβ these specify the lower left corner of the viewport rectangle, in pixels. the initial value is(0,0)π«Άwidth,heightβ these specify the width and height of the viewport. when a GL context is first attached to a window,widthandheightare set to the dimensions of that window β¨
π¦ DESCRIPTION π¦
okay so glViewport specifies the affine transformation of x and y from normalized device coordinates to window coordinates. Let x nd and y nd be normalized device coordinates. Then the window coordinates x w and y w are computed as follows:
x w = x nd + 1 β’ width 2 + x
y w = y nd + 1 β’ height 2 + y
viewport width and height are silently clamped to a range that depends on the implementation. to query this range, call glGet() with argument GL_MAX_VIEWPORT_DIMS π
π ERRORS π
GL_INVALID_VALUE is generated if either width or height is negative. like, do not do that. π
π ASSOCIATED GETS π
glGet()with argumentGL_VIEWPORTglGet()with argumentGL_MAX_VIEWPORT_DIMS
π VERSION SUPPORT π
the gridβs header is Function / Feature Name versus OpenGL Version. the function / feature name is glViewport, and it gets a β in every single listed version:
- OpenGL
2.0ββ - OpenGL
2.1ββ - OpenGL
3.0ββ - OpenGL
3.1ββ - OpenGL
3.2ββ - OpenGL
3.3ββ - OpenGL
4.0ββ - OpenGL
4.1ββ - OpenGL
4.2ββ - OpenGL
4.3ββ - OpenGL
4.4ββ - OpenGL
4.5ββ
she ate and left no crumbs. πβ¨
π SEE ALSO π
glDepthRange()
π COPYRIGHT π
Copyright Β© 1991-2006 Silicon Graphics, Inc. Copyright Β© 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/. π«Ά
π COPYRIGHT π (the sequel π )
Copyright Β© 1991-2006 Silicon Graphics, Inc.
Copyright Β© 2010-2014 Khronos Group
okay bestie, thatβs the whole page π«Ά source/version: [FIXME: source] Β· date: 08/09/2021 Β· manual: GLVIEWPORT(3G) β mwah, go set that viewport πβ¨
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms