GLCLEARBUFFER(3G)

    .SH "NAME" glClearBuffer - clear individual buffers of the currently bound draw framebuffer
    .SH "C SPECIFICATION"

            .HP u void glClearBufferiv(GLenum buffer, GLint drawBuffer, const GLint * value);

            .HP u void glClearBufferuiv(GLenum buffer, GLint drawBuffer, const GLuint * value);

            .HP u void glClearBufferfv(GLenum buffer, GLint drawBuffer, const GLfloat * value);

            .HP u void glClearBufferfi(GLenum buffer, GLint drawBuffer, GLfloat depth, GLint stencil);

    .SH "PARAMETERS"

        .PP buffer

                    Specify the buffer to clear.

            .RE
            .PP drawBuffer

                        Specify a particular draw buffer to clear.

                .RE
                .PP value

                            For color buffers, a pointer to a four-element vector specifying R, G, B and A values to clear the buffer to. For depth buffers, a pointer to a single depth value to clear the buffer to. For stencil buffers, a pointer to a single stencil value to clear the buffer to.

                    .RE
                    .PP depth

                                The value to clear a depth render buffer to.

                        .RE
                        .PP stencil

                                    The value to clear a stencil render buffer to.

                            .RE

                        .SH "DESCRIPTION"
                            .PP glClearBuffer* clears the specified buffer to the specified value(s). If buffer is GL_COLOR, a particular draw buffer GL_DRAWBUFFERi is specified by passing i as drawBuffer. In this case, value points to a four-element vector specifying the R, G, B and A color to clear that draw buffer to. The glClearBufferfv, glClearBufferiv, and glClearBufferuiv commands should be used to clear fixed- and floating-point, signed integer, and unsigned integer color buffers respectively. Clamping and conversion for fixed-point color buffers are performed in the same fashion as glClearColor().
                            .PP If buffer is GL_DEPTH, drawBuffer must be zero, and value points to a single value to clear the depth buffer to. Only glClearBufferfv should be used to clear depth buffers. Clamping and conversion for fixed-point depth buffers are performed in the same fashion as glClearDepthf().
                            .PP If buffer is GL_STENCIL, drawBuffer must be zero, and value points to a single value to clear the stencil buffer to. Only glClearBufferiv should be used to clear stencil buffers. Masking and type conversion are performed in the same fashion as glClearStencil().
                            .PP glClearBufferfi may be used to clear the depth and stencil buffers. buffer must be GL_DEPTH_STENCIL and drawBuffer must be zero. depth and stencil are the depth and stencil values, respectively.
                            .PP The result of glClearBuffer is undefined if no conversion between the type of value and the buffer being cleared is defined. However, this is not an error.

                        .SH "ERRORS"
                            .PP GL_INVALID_ENUM is generated by glClearBufferiv if buffer is not GL_COLOR or GL_STENCIL.
                            .PP GL_INVALID_ENUM is generated by glClearBufferfv if buffer is not GL_COLOR or GL_DEPTH.
                            .PP GL_INVALID_ENUM is generated by glClearBufferuiv if buffer is not GL_COLOR.
                            .PP GL_INVALID_ENUM is generated by glClearBufferfi if buffer is not GL_DEPTH_STENCIL.
                            .PP GL_INVALID_VALUE is generated if buffer is GL_COLOR and drawBuffer is greater than or equal to GL_MAX_DRAW_BUFFERS.
                            .PP GL_INVALID_VALUE is generated if buffer is GL_DEPTH, GL_STENCIL or GL_DEPTH_STENCIL and drawBuffer is not zero.

                        .SH "API VERSION SUPPORT"

                            .TS allbox tab(:); l l l l l l l l l l l l l l l l l l l l. T{ glClearBufferiv T}:T{ T}:T{ T}:T{ T}:T{ T} T{ glClearBufferuiv T}:T{ T}:T{ T}:T{ T}:T{ T} T{ glClearBufferfv T}:T{ T}:T{ T}:T{ T}:T{ T} T{ glClearBufferfi T}:T{ T}:T{ T}:T{ T}:T{ T}

                        .SH "SEE ALSO"
                            .PP glClearColor(), glClearDepthf(), glClearStencil(), glClear()

                        .SH "COPYRIGHT"
                            .PP Copyright © 2010-2015 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 © 2010-2015 Khronos Group