glClearBufferuiv

glClearBuffer: man4/glClearBuffer.xml

These commands clear a specified buffer of a framebuffer to specified value(s). For glClearBuffer*, the framebuffer is the currently bound draw framebuffer object. For glClearNamedFramebuffer*, framebuffer is zero, indicating the default draw framebuffer, or the name of a framebuffer object. buffer and drawbuffer identify the buffer to clear. If buffer is GL_COLOR, a particular draw buffer GL_DRAW_BUFFER i is specified by passing i as drawbuffer, and value points to a four-element vector specifying the R, G, B and A color to clear that draw buffer to. If the value of GL_DRAW_BUFFER i is GL_NONE, the command has no effect. Otherwise, the value of GL_DRAW_BUFFER i identifies one or more color buffers, each of which is cleared to the same value. Clamping and type conversion for fixed-point color buffers are performed in the same fashion as for glClearColor. The *fv, *iv and *uiv forms of these commands should be used to clear fixed- and floating-point, signed integer, and unsigned integer color buffers respectively. If buffer is GL_DEPTH, drawbuffer must be zero, and value points to a single value to clear the depth buffer to. Clamping and type conversion for fixed-point depth buffers are performed in the same fashion as for glClearDepth. Only the *fv forms of these commands should be used to clear depth buffers; other forms do not accept a buffer of GL_DEPTH. If buffer is GL_STENCIL, drawbuffer must be zero, and value points to a single value to clear the stencil buffer to. Masking is performed in the same fashion as for glClearStencil. Only the *iv forms of these commands should be used to clear stencil buffers; be used to clear stencil buffers; other forms do not accept a buffer of GL_STENCIL. glClearBufferfi and glClearNamedFramebufferfi are used to clear the depth and stencil buffers simultaneously. buffer must be GL_DEPTH_STENCIL and drawbuffer must be zero. depth and stencil are the values to clear the depth and stencil buffers to, respectively. Clamping and type conversion of depth for fixed-point depth buffers are performed in the same fashion as for glClearDepth. Masking of stencil for stencil buffers is performed in the same fashion as for glClearStencil. These commands are equivalent to clearing the depth and stencil buffers separately, but may be faster when a buffer of internal format GL_DEPTH_STENCIL is being cleared. The same per-fragment and masking operations defined for glClear are applied. The result of these commands is undefined if no conversion between the type of the specified value and the type of the buffer being cleared is defined (for example, if glClearBufferiv is called for a fixed- or floating-point buffer, or if glClearBufferfv is called for a signed or unsigned integer buffer). This is not an error.

@OpenGL_Version(OGLIntroducedIn.V3P0)
fn_glClearBufferuiv glClearBufferuiv;

See Also

glClearColor, glClearDepth, glClearStencil, glClear

Meta