GLVIEWPORTINDEXED(3G)

    .SH "NAME" glViewportIndexed - set a specified viewport
    .SH "C SPECIFICATION"

            .HP u void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);

            .HP u void glViewportIndexedfv(GLuint index, const GLfloat *v);

    .SH "PARAMETERS"

        .PP index

                    Specify the first viewport to set.

            .RE
            .PP x, y

                        For glViewportIndexedf, specifies the lower left corner of the viewport rectangle, in pixels. The initial value is (0,0).

                .RE
                .PP w, h

                            For glViewportIndexedf, specifies the width and height of the viewport. When a GL context is first attached to a window, w and h are set to the dimensions of that window.

                    .RE
                    .PP v

                                For glViewportIndexedfv, specifies the address of an array containing the viewport parameters.

                        .RE

                    .SH "DESCRIPTION"
                        .PP glViewportIndexedf and glViewportIndexedfv specify the parameters for a single viewport. index specifies the index of the viewport to modify. index must be less than the value of GL_MAX_VIEWPORTS. For glViewportIndexedf, x, y, w, and h specify the left, bottom, width and height of the viewport in pixels, respectively. For glViewportIndexedfv, v contains the address of an array of floating point values specifying the left (x), bottom (y), width (w), and height (h) of each viewport, in that order. x and y give the location of the viewport's lower left corner, and w and h give the width and height of the viewport, respectively. The viewport 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 The location of the viewport's bottom left corner, given by (x, y) is clamped to be within the implementaiton-dependent viewport bounds range. The viewport bounds range [min, max] can be determined by calling glGet() with argument GL_VIEWPORT_BOUNDS_RANGE. 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.
                        .PP The precision with which the GL interprets the floating point viewport bounds is implementation-dependent and may be determined by querying the impementation-defined constant GL_VIEWPORT_SUBPIXEL_BITS.
                        .PP Calling glViewportIndexedfv is equivalent to calling glViewportArray() with first set to index, count set to 1 and v passsed directly. glViewportIndexedf is equivalent to:

                        void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h) {
                            const float v[4]  = { x, y, w, h };
                            glViewportArrayv(index, 1, v);
                        }

                    .SH "ERRORS"
                        .PP GL_INVALID_VALUE is generated if index is greater than or equal to the value of GL_MAX_VIEWPORTS.
                        .PP GL_INVALID_VALUE is generated if either w or h is negative.

                    .SH "ASSOCIATED GETS"
                        .PP glGet() with argument GL_VIEWPORT
                        .PP glGet() with argument GL_MAX_VIEWPORT_DIMS
                        .PP glGet() with argument GL_VIEWPORT_BOUNDS_RANGE
                        .PP glGet() with argument GL_VIEWPORT_SUBPIXEL_BITS

                    .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{ OpenGL Version T} T{ Function / Feature Name T}:T{ 2.0 T}:T{ 2.1 T}:T{ 3.0 T}:T{ 3.1 T}:T{ 3.2 T}:T{ 3.3 T}:T{ 4.0 T}:T{ 4.1 T}:T{ 4.2 T}:T{ 4.3 T}:T{ 4.4 T}:T{ 4.5 T} l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ glViewportIndexedf 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} T{ glViewportIndexedfv 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}

                    .SH "SEE ALSO"
                        .PP glDepthRange(), glViewport(), glViewportArray()

                    .SH "COPYRIGHT"
                        .PP Copyright © 2010-2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. https://opencontent.org/openpub/.

COPYRIGHT
Copyright © 2010-2014 Khronos Group