GLCLIPCONTROL(3G)

    .SH "NAME" glClipControl - control clip coordinate to window coordinate behavior
    .SH "C SPECIFICATION"

            .HP u void glClipControl(GLenum origin, GLenum depth);

    .SH "PARAMETERS"

            .PP origin

                        Specifies the clip control origin. Must be one of GL_LOWER_LEFT or GL_UPPER_LEFT.

                .RE
                .PP depth

                            Specifies the clip control depth mode. Must be one of GL_NEGATIVE_ONE_TO_ONE or GL_ZERO_TO_ONE.

                    .RE

            .SH "DESCRIPTION"
                .PP glClipControl controls the clipping volume behavior and the clip coordinate to window coordinate transformation behavior.
                .PP The view volume is defined by $$z_{min} \leq z_c \leq w_c$$ where $z_{min} = -w_c$ when depth is GL_NEGATIVE_ONE_TO_ONE, and $z_{min} = 0$ when depth is GL_ZERO_TO_ONE.
                .PP The normalized device coordinate $y_d$ is given by $$y_d = { { f \times y_c } \over w_c }$$ where $f = 1$ when origin is GL_LOWER_LEFT, and $f = -1$ when origin is GL_UPPER_LEFT.
                .PP The window coordinate $z_w$ is given by $$z_w = s \times z_d + b$$ where $s = { { f - n } \over 2 }$ and $b = { {n + f} \over 2 }$ when depth is GL_NEGATIVE_ONE_TO_ONE, and $s = f - n$ and $b = n$ when depth is GL_ZERO_TO_ONE. $n$ and $f$ are the near and far depth range values set with glDepthRange().
                .PP Finally, the polygon area computation defined by gl_FrontFacing() to determine if a polygon is front- or back-facing has its sign negated when origin is GL_UPPER_LEFT.

            .SH "NOTES"
                .PP The default GL clip volume definition is for a origin of GL_LOWER_LEFT and a depth of GL_NEGATIVE_ONE_TO_ONE.
                .PP An origin of GL_UPPER_LEFT and a depth of GL_ZERO_TO_ONE corresponds to Direct3D's clip volume definition.
                .PP An origin of GL_UPPER_LEFT and a depth of GL_NEGATIVE_ONE_TO_ONE corresponds to the upper-left origin of the window coordinate system of Microsoft Windows and the X Window System.
                .PP There is extensive discussion of the uses and further consequences of the different clip volume settings in the GL_ARB_clip_control extension specification in the OpenGL Registry at URL http://www.opengl.org/registry/.

            .SH "ERRORS"
                .PP An GL_INVALID_ENUM error is generated if origin is not GL_LOWER_LEFT or GL_UPPER_LEFT.
                .PP An GL_INVALID_ENUM error is generated if depth is not GL_NEGATIVE_ONE_TO_ONE or GL_ZERO_TO_ONE.

            .SH "VERSION SUPPORT"
                .TS allbox tab(:); l l l l l l l l l l l l l. T{ glClipControl 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 gl_ClipDistance(), gl_CullDistance(), gl_FrontFacing(), glDepthRange().

            .SH "COPYRIGHT"
                .PP Copyright © 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. http://opencontent.org/openpub/.

COPYRIGHT
Copyright © 2014 Khronos Group