'\" t .\" Title: glClearBufferSubData .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 05/21/2015 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLCLEARBUFFERSUBDATA" "3G" "05/21/2015" "[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" glClearBufferSubData, glClearNamedBufferSubData \- fill all or part of buffer object\*(Aqs data store with a fixed value .SH "C SPECIFICATION" .HP \w'void\ glClearBufferSubData('u .BI "void glClearBufferSubData(GLenum\ " "target" ", GLenum\ " "internalformat" ", GLintptr\ " "offset" ", GLsizeiptr\ " "size" ", GLenum\ " "format" ", GLenum\ " "type" ", const\ void\ *\ " "data" ");" .HP \w'void\ glClearNamedBufferSubData('u .BI "void glClearNamedBufferSubData(GLuint\ " "buffer" ", GLenum\ " "internalformat" ", GLintptr\ " "offset" ", GLsizei\ " "size" ", GLenum\ " "format" ", GLenum\ " "type" ", const\ void\ *" "data" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the target to which the buffer object is bound for \fBglClearBufferSubData\fR, which must be one of the buffer binding targets in the following table: .TS allbox tab(:); lB lB. T{ \fBBuffer Binding Target\fR T}:T{ \fBPurpose\fR T} .T& l l l l l l l l l l l l l l l l l l l l l l l l l l l l. T{ \fBGL_ARRAY_BUFFER\fR T}:T{ Vertex attributes T} T{ \fBGL_ATOMIC_COUNTER_BUFFER\fR T}:T{ Atomic counter storage T} T{ \fBGL_COPY_READ_BUFFER\fR T}:T{ Buffer copy source T} T{ \fBGL_COPY_WRITE_BUFFER\fR T}:T{ Buffer copy destination T} T{ \fBGL_DISPATCH_INDIRECT_BUFFER\fR T}:T{ Indirect compute dispatch commands T} T{ \fBGL_DRAW_INDIRECT_BUFFER\fR T}:T{ Indirect command arguments T} T{ \fBGL_ELEMENT_ARRAY_BUFFER\fR T}:T{ Vertex array indices T} T{ \fBGL_PIXEL_PACK_BUFFER\fR T}:T{ Pixel read target T} T{ \fBGL_PIXEL_UNPACK_BUFFER\fR T}:T{ Texture data source T} T{ \fBGL_QUERY_BUFFER\fR T}:T{ Query result buffer T} T{ \fBGL_SHADER_STORAGE_BUFFER\fR T}:T{ Read\-write storage for shaders T} T{ \fBGL_TEXTURE_BUFFER\fR T}:T{ Texture data buffer T} T{ \fBGL_TRANSFORM_FEEDBACK_BUFFER\fR T}:T{ Transform feedback buffer T} T{ \fBGL_UNIFORM_BUFFER\fR T}:T{ Uniform block storage T} .TE .sp .RE .PP \fIbuffer\fR .RS 4 Specifies the name of the buffer object for \fBglClearNamedBufferSubData\fR\&. .RE .PP \fIinternalformat\fR .RS 4 The internal format with which the data will be stored in the buffer object\&. .RE .PP \fIoffset\fR .RS 4 The offset in basic machine units into the buffer object\*(Aqs data store at which to start filling\&. .RE .PP \fIsize\fR .RS 4 The size in basic machine units of the range of the data store to fill\&. .RE .PP \fIformat\fR .RS 4 The format of the data in memory addressed by \fIdata\fR\&. .RE .PP \fItype\fR .RS 4 The type of the data in memory addressed by \fIdata\fR\&. .RE .PP \fIdata\fR .RS 4 The address of a memory location storing the data to be replicated into the buffer\*(Aqs data store\&. .RE .SH "DESCRIPTION" .PP \fBglClearBufferSubData\fR and \fBglClearNamedBufferSubData\fR fill a specified region of a buffer object\*(Aqs data store with data from client memory\&. .PP \fIoffset\fR and \fIsize\fR specify the extent of the region within the data store of the buffer object to fill with data\&. Data, initially supplied in a format specified by \fIformat\fR in data type \fItype\fR is read from the memory address given by \fIdata\fR and converted into the internal representation given by \fIinternalformat\fR, which must be one of the following sized internal formats: .TS allbox tab(:); lB lB lB lB cB s s s lB lB lB lB cB cB cB cB. T{ \ \& T}:T{ \ \& T}:T{ \ \& T}:T{ \ \& T}:T{ \fB Component \fR T} T{ \fBSized Internal Format\fR T}:T{ \fBBase Type\fR T}:T{ \fBComponents\fR T}:T{ \fBNorm\fR T}:T{ 0 T}:T{ 1 T}:T{ 2 T}:T{ 3 T} .T& l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c. T{ \fBGL_R8\fR T}:T{ ubyte T}:T{ 1 T}:T{ YES T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R16\fR T}:T{ ushort T}:T{ 1 T}:T{ YES T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R16F\fR T}:T{ half T}:T{ 1 T}:T{ NO T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R32F\fR T}:T{ float T}:T{ 1 T}:T{ NO T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R8I\fR T}:T{ byte T}:T{ 1 T}:T{ NO T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1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:T{ NO T}:T{ R T}:T{ G T}:T{ 0 T}:T{ 1 T} T{ \fBGL_RG32UI\fR T}:T{ uint T}:T{ 2 T}:T{ NO T}:T{ R T}:T{ G T}:T{ 0 T}:T{ 1 T} T{ \fBGL_RGB32F\fR T}:T{ float T}:T{ 3 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ 1 T} T{ \fBGL_RGB32I\fR T}:T{ int T}:T{ 3 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ 1 T} T{ \fBGL_RGB32UI\fR T}:T{ uint T}:T{ 3 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ 1 T} T{ \fBGL_RGBA8\fR T}:T{ uint T}:T{ 4 T}:T{ YES T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA16\fR T}:T{ short T}:T{ 4 T}:T{ YES T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA16F\fR T}:T{ half T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA32F\fR T}:T{ float T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA8I\fR T}:T{ byte T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA16I\fR T}:T{ short T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA32I\fR T}:T{ int T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA8UI\fR T}:T{ ubyte T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA16UI\fR T}:T{ ushort T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA32UI\fR T}:T{ uint T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} .TE .PP This converted data is then replicated throughout the specified region of the buffer object\*(Aqs data store\&. If \fIdata\fR is NULL, then the subrange of the buffer\*(Aqs data store is filled with zeros\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated by \fBglClearBufferSubData\fR if \fItarget\fR is not one of the generic buffer binding targets\&. .PP \fBGL_INVALID_VALUE\fR is generated by \fBglClearBufferSubData\fR if no buffer is bound to \fItarget\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglClearNamedBufferSubData\fR if \fIbuffer\fR is not the name of an existing buffer object\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fIinternalformat\fR is not one of the valid sized internal formats listed in the table above\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIoffset\fR or \fIrange\fR are not multiples of the number of basic machine units per\-element for the internal format specified by \fIinternalformat\fR\&. This value may be computed by multiplying the number of components for \fIinternalformat\fR from the table by the size of the base type from the table\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIoffset\fR or \fIsize\fR is negative, or if $offset + size$ is greater than the value of \fBGL_BUFFER_SIZE\fR for the buffer object\&. .PP \fBGL_INVALID_OPERATION\fR is generated if any part of the specified range of the buffer object is mapped with \fBglMapBufferRange\fR() or \fBglMapBuffer\fR(), unless it was mapped with the \fBGL_MAP_PERSISTENT_BIT\fR bit set in the \fBglMapBufferRange\fR\fIaccess\fR flags\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIformat\fR is not a valid format, or \fItype\fR is not a valid type\&. .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{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .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{ \fBglClearBufferSubData\fR 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{ \fBglClearNamedBufferSubData\fR 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} .TE .sp .SH "SEE ALSO" .PP \fBglClearBufferData\fR()\&. .SH "COPYRIGHT" .PP Copyright \(co 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\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2014 Khronos Group .br