glClearTexImage

glClearTexImage: man4/glClearTexImage.xml

glClearTexImage fills all an image contained in a texture with an application supplied value. texture must be the name of an existing texture. Further, texture may not be the name of a buffer texture, nor may its internal format 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.

glClearTexImage is available only if the GL version is 4.4 or greater.

@OpenGL_Version(OGLIntroducedIn.V4P4)
@OpenGL_Extension("GL_ARB_clear_texture")
fn_glClearTexImage glClearTexImage;

See Also

glClearTexSubImage, glTexStorage1D, glTexStorage2D, glTexStorage3D, glTexImage1D, glTexImage2D, glTexImage3D

Meta