'\" t .\" Title: glClearBuffer .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 05/30/2012 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLCLEARBUFFER" "3G" "05/30/2012" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glClearBuffer \- clear individual buffers of the currently bound draw framebuffer .SH "C SPECIFICATION" .HP \w'void\ glClearBufferiv('u .BI "void glClearBufferiv(GLenum\ " "buffer" ", GLint\ " "drawBuffer" ", const\ GLint\ *\ " "value" ");" .HP \w'void\ glClearBufferuiv('u .BI "void glClearBufferuiv(GLenum\ " "buffer" ", GLint\ " "drawBuffer" ", const\ GLuint\ *\ " "value" ");" .HP \w'void\ glClearBufferfv('u .BI "void glClearBufferfv(GLenum\ " "buffer" ", GLint\ " "drawBuffer" ", const\ GLfloat\ *\ " "value" ");" .HP \w'void\ glClearBufferfi('u .BI "void glClearBufferfi(GLenum\ " "buffer" ", GLint\ " "drawBuffer" ", GLfloat\ " "depth" ", GLint\ " "stencil" ");" .SH "PARAMETERS" .PP \fIbuffer\fR .RS 4 Specify the buffer to clear\&. .RE .PP \fIdrawBuffer\fR .RS 4 Specify a particular draw buffer to clear\&. .RE .PP \fIvalue\fR .RS 4 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 \fIdepth\fR .RS 4 The value to clear a depth render buffer to\&. .RE .PP \fIstencil\fR .RS 4 The value to clear a stencil render buffer to\&. .RE .SH "DESCRIPTION" .PP \fBglClearBuffer*\fR clears the specified buffer to the specified value(s)\&. If \fIbuffer\fR is \fBGL_COLOR\fR, a particular draw buffer \fBGL_DRAWBUFFER\fR\fB\fIi\fR\fR is specified by passing \fIi\fR as \fIdrawBuffer\fR\&. In this case, \fIvalue\fR points to a four\-element vector specifying the R, G, B and A color to clear that draw buffer to\&. If \fIbuffer\fR is one of \fBGL_FRONT\fR, \fBGL_BACK\fR, \fBGL_LEFT\fR, \fBGL_RIGHT\fR, or \fBGL_FRONT_AND_BACK\fR, identifying multiple buffers, each selected buffer is cleared to the same value\&. Clamping and conversion for fixed\-point color buffers are performed in the same fashion as \fBglClearColor\fR()\&. .PP If \fIbuffer\fR is \fBGL_DEPTH\fR, \fIdrawBuffer\fR must be zero, and \fIvalue\fR points to a single value to clear the depth buffer to\&. Only \fBglClearBufferfv\fR should be used to clear depth buffers\&. Clamping and conversion for fixed\-point depth buffers are performed in the same fashion as \fBglClearDepth\fR()\&. .PP If \fIbuffer\fR is \fBGL_STENCIL\fR, \fIdrawBuffer\fR must be zero, and \fIvalue\fR points to a single value to clear the stencil buffer to\&. Only \fBglClearBufferiv\fR should be used to clear stencil buffers\&. Masking and type conversion are performed in the same fashion as \fBglClearStencil\fR()\&. .PP \fBglClearBufferfi\fR may be used to clear the depth and stencil buffers\&. \fIbuffer\fR must be \fBGL_DEPTH_STENCIL\fR and \fIdrawBuffer\fR must be zero\&. \fIdepth\fR and \fIstencil\fR are the depth and stencil values, respectively\&. .PP The result of \fBglClearBuffer\fR is undefined if no conversion between the type of \fIvalue\fR and the buffer being cleared is defined\&. However, this is not an error\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated by \fBglClearBufferif\fR, \fBglClearBufferfv\fR and \fBglClearBufferuiv\fR if \fIbuffer\fR is not \fBGL_COLOR\fR, \fBGL_FRONT\fR, \fBGL_BACK\fR, \fBGL_LEFT\fR, \fBGL_RIGHT\fR, \fBGL_FRONT_AND_BACK\fR, \fBGL_DEPTH\fR or \fBGL_STENCIL\fR\&. .PP \fBGL_INVALID_ENUM\fR is generated by \fBglClearBufferfi\fR if \fIbuffer\fR is not \fBGL_DEPTH_STENCIL\fR\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIbuffer\fR is \fBGL_COLOR\fR, \fBGL_FRONT\fR, \fBGL_BACK\fR, \fBGL_LEFT\fR, \fBGL_RIGHT\fR, or \fBGL_FRONT_AND_BACK\fR and \fIdrawBuffer\fR is greater than or equal to \fBGL_MAX_DRAW_BUFFERS\fR\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIbuffer\fR is \fBGL_DEPTH\fR, \fBGL_STENCIL\fR or \fBGL_DEPTH_STENCIL\fR and \fIdrawBuffer\fR is not zero\&. .SH "SEE ALSO" .PP \fBglClearColor\fR(), \fBglClearDepth\fR(), \fBglClearStencil\fR(), \fBglClear\fR() .SH "COPYRIGHT" .PP Copyright \(co 2010 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\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&.