GLCLEARTEXIMAGE(3G)
πΈ glClearTexImage β filling a texture image with one constant value, bestie πΈ
okay so this is the GLCLEARTEXIMAGE(3G) page from the 3G manual β yes, the header has a [FIXME: manual] placeholder, we love a work in progress β and it's literally about clearing a whole texture image to a constant value. no cap, it's giving "one value to rule the whole image" energy. β¨
π NAME π
glClearTexImage β fills all a texture image with a constant value π
π§ C SPECIFICATION π§
void glClearTexImage(GLuint texture, GLint level, GLenum format,
GLenum type, const void * data);
π PARAMETERS π
textureβ the name of an existing texture object containing the image to be cleared, bestie.levelβ the level of texture containing the region to be cleared.formatβ the format of the data whose address in memory is given bydata.typeβ the type of the data whose address in memory is given bydata.dataβ the address in memory of the data to be used to clear the specified region.
π DESCRIPTION π
glClearTexImage fills, like, all an image contained in a texture with an application supplied value. texture must be the name of an existing texture. Also, texture may not be the name of a buffer texture, and its internal format may not be compressed. π«Ά
format and type specify the format and type of the source data and are interpreted as they are for glTexImage3D(). Textures with a base internal format of GL_DEPTH_COMPONENT, GL_STENCIL_INDEX, or GL_DEPTH_STENCIL 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. π
data 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 glTexImage*, glTexStorage* or glCopyTexImage* commands), and then used to fill the specified range of the destination texture level. If data is NULL, 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. π
β NOTES β
glClearTexImage is available only if the GL version is 4.4 or greater. no cap. π₯
π ERRORS π
GL_INVALID_OPERATIONis generated iftextureis zero or not the name of an existing texture object. πGL_INVALID_OPERATIONis generated iftextureis a buffer texture.GL_INVALID_OPERATIONis generated iftexturehas a compressed internal format.GL_INVALID_OPERATIONis generated if the base internal format isGL_DEPTH_COMPONENTandformatis notGL_DEPTH_COMPONENT.GL_INVALID_OPERATIONis generated if the base internal format isGL_DEPTH_STENCILandformatis notGL_DEPTH_STENCIL.GL_INVALID_OPERATIONis generated if the base internal format isGL_STENCIL_INDEXandformatis notGL_STENCIL_INDEX.GL_INVALID_OPERATIONis generated if the base internal format isGL_RGBAandformatisGL_DEPTH_COMPONENT,GL_STENCIL_INDEX, orGL_DEPTH_STENCIL.GL_INVALID_OPERATIONis generated if the internal format is integer andformatdoes not specify integer data.GL_INVALID_OPERATIONis generated if the internal format is not integer andformatspecifies integer data.GL_INVALID_OPERATIONis generated if the image array identified bylevelhas not previously been defined by a call toglTexImage*orglTexStorage*.
π ASSOCIATED GETS π
glGetTexImage()glGetInternalformat()
π VERSION SUPPORT π
the vibe check: the Function / Feature Name is glClearTexImage, and the OpenGL Version columns go like this:
2.0β-2.1β-3.0β-3.1β-3.2β-3.3β-4.0β-4.1β-4.2β-4.3β-4.4ββ4.5ββ
π¦ SEE ALSO π¦
glClearTexSubImage()glTexStorage1D()glTexStorage2D()glTexStorage3D()glTexImage1D()glTexImage2D()glTexImage3D()
π COPYRIGHT π
Copyright Β© 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. http://opencontent.org/openpub/.
π COPYRIGHT π
Copyright Β© 2013-2014 Khronos Group
ok that's the whole page bestie π«Ά this came from[FIXME: source], dated08/09/2021, and the manual name isGLCLEARTEXIMAGE(3G). go clear some textures and slay β¨π
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms