'\" t .\" Title: glClearTexSubImage .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLCLEARTEXSUBIMAGE" "3G" "01/03/2018" "[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" glClearTexSubImage \- fills all or part of a texture image with a constant value .SH "C SPECIFICATION" .HP \w'void\ glClearTexSubImage('u .BI "void glClearTexSubImage(GLuint\ " "texture" ", GLint\ " "level" ", GLint\ " "xoffset" ", GLint\ " "yoffset" ", GLint\ " "zoffset" ", GLsizei\ " "width" ", GLsizei\ " "height" ", GLsizei\ " "depth" ", GLenum\ " "format" ", GLenum\ " "type" ", const\ void\ *\ " "data" ");" .SH "PARAMETERS" .PP \fItexture\fR .RS 4 The name of an existing texture object containing the image to be cleared\&. .RE .PP \fIlevel\fR .RS 4 The level of \fItexture\fR containing the region to be cleared\&. .RE .PP \fIxoffset\fR .RS 4 The coordinate of the left edge of the region to be cleared\&. .RE .PP \fIyoffset\fR .RS 4 The coordinate of the lower edge of the region to be cleared\&. .RE .PP \fIzoffset\fR .RS 4 The coordinate of the front of the region to be cleared\&. .RE .PP \fIwidth\fR .RS 4 The width of the region to be cleared\&. .RE .PP \fIheight\fR .RS 4 The height of the region to be cleared\&. .RE .PP \fIdepth\fR .RS 4 The depth of the region to be cleared\&. .RE .PP \fIformat\fR .RS 4 The format of the data whose address in memory is given by \fIdata\fR\&. .RE .PP \fItype\fR .RS 4 The type of the data whose address in memory is given by \fIdata\fR\&. .RE .PP \fIdata\fR .RS 4 The address in memory of the data to be used to clear the specified region\&. .RE .SH "DESCRIPTION" .PP \fBglClearTexSubImage\fR fills all or part of an image contained in a texture with an application supplied value\&. \fItexture\fR must be the name of an existing texture\&. Further, \fItexture\fR may not be the name of a buffer texture, nor may its internal format be compressed\&. .PP Arguments \fIxoffset\fR, \fIyoffset\fR, and \fIzoffset\fR specify the lower left texel coordinates of a width\-wide by height\-high by depth\-deep rectangular subregion of the texel array\&. .PP For one\-dimensional array textures, \fIyoffset\fR is interpreted as the first layer to be cleared and \fIheight\fR is the number of layers to clear\&. For two\-dimensional array textures, \fIzoffset\fR is interpreted as the first layer to be cleared and \fIdepth\fR is the number of layers to clear\&. Cube map textures are treated as an array of six slices in the z\-dimension, where the value of \fIzoffset\fR is interpreted as specifying the cube map face for the corresponding layer and \fIdepth\fR is the number of faces to clear\&. For cube map array textures, \fIzoffset\fR is the first layer\-face to clear, and \fIdepth\fR is the number of layer\-faces to clear\&. Each layer\-face is translated into an array layer and a cube map face as described in the OpenGL Specification\&. .PP Negative values of \fIxoffset\fR, \fIyoffset\fR, and \fIzoffset\fR correspond to the coordinates of border texels\&. Taking ws, hs, ds, wb, hb, and db to be the specified \fIwidth\fR, \fIheight\fR, \fIdepth\fR, and the border width, border height, and border depth of the texel array and taking x, y, z, w, h, and d to be the \fIxoffset\fR, \fIyoffset\fR, \fIzoffset\fR, \fIwidth\fR, \fIheight\fR, and \fIdepth\fR argument values, any of the following relationships generates a \fBGL_INVALID_OPERATION\fR error: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} x < w b .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} x + w > w s \- w b .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} y < \- h b .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} y + h > h s \- h b .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} z < \- d b .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} z + d > d s \- d b .RE .PP For texture types that do not have certain dimensions, this command treats those dimensions as having a size of 1\&. For example, to clear a portion of a two\-dimensional texture, use \fIzoffset\fR equal to zero and \fIdepth\fR equal to one\&. .PP \fIformat\fR and \fItype\fR specify the format and type of the source data and are interpreted as they are for \fBglTexImage3D\fR()\&. Textures with a base internal format of \fBGL_DEPTH_COMPONENT\fR, \fBGL_STENCIL_INDEX\fR, or \fBGL_DEPTH_STENCIL\fR require depth component, stencil, or depth\-stencil component data respectively\&. Textures with other base internal formats require RGBA formats\&. Textures with integer internal formats require integer data\&. .PP \fIdata\fR is a pointer to an array of between one and four components of texel data that will be used as the source for the constant fill value\&. The elements of data are converted by the GL into the internal format of the texture image (that was specified when the level was defined by any of the \fBglTexImage*\fR, \fBglTexStorage*\fR or \fBglCopyTexImage*\fR commands), and then used to fill the specified range of the destination texture level\&. If \fIdata\fR is \fBNULL\fR, then the pointer is ignored and the sub\-range of the texture image is filled with zeros\&. If texture is a multisample texture, all the samples in a texel are cleared to the value specified by data\&. .SH "NOTES" .PP \fBglClearTexSubImage\fR is available only if the GL version is 4\&.4 or greater\&. .SH "ERRORS" .PP \fBGL_INVALID_OPERATION\fR is generated if \fItexture\fR is zero or not the name of an existing texture object\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fItexture\fR is a buffer texture\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fItexture\fR has a compressed internal format\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the base internal format is \fBGL_DEPTH_COMPONENT\fR and \fIformat\fR is not \fBGL_DEPTH_COMPONENT\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the base internal format is \fBGL_DEPTH_STENCIL\fR and \fIformat\fR is not \fBGL_DEPTH_STENCIL\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the base internal format is \fBGL_STENCIL_INDEX\fR and \fIformat\fR is not \fBGL_STENCIL_INDEX\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the base internal format is \fBGL_RGBA\fR and \fIformat\fR is \fBGL_DEPTH_COMPONENT\fR, \fBGL_STENCIL_INDEX\fR, or \fBGL_DEPTH_STENCIL\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the internal format is integer and \fIformat\fR does not specify integer data\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the internal format is not integer and \fIformat\fR specifies integer data\&. .PP \fBGL_INVALID_OPERATION\fR error is generated if the \fIxoffset\fR, \fIyoffset\fR, \fIzoffset\fR, \fIwidth\fR, \fIheight\fR, and \fIdepth\fR parameters (or combinations thereof) specify a region that falls outside the defined texture image array (including border, if any)\&. .SH "ASSOCIATED GETS" .PP \fBglGetTexImage\fR(), \fBglGetInternalformat\fR() .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. T{ \fBglClearTexSubImage\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 1 .SH "SEE ALSO" .PP \fBglClearTexImage\fR(), \fBglTexStorage1D\fR(), \fBglTexStorage2D\fR(), \fBglTexStorage3D\fR(), \fBglTexImage1D\fR(), \fBglTexImage2D\fR(), \fBglTexImage3D\fR() .SH "COPYRIGHT" .PP Copyright \(co 2013\-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 2013-2014 Khronos Group .br