'\" t .\" Title: glCompressedTexSubImage2D .\" 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 "GLCOMPRESSEDTEXSUBIM" "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" glCompressedTexSubImage2D, glCompressedTextureSubImage2D \- specify a two\-dimensional texture subimage in a compressed format .SH "C SPECIFICATION" .HP \w'void\ glCompressedTexSubImage2D('u .BI "void glCompressedTexSubImage2D(GLenum\ " "target" ", GLint\ " "level" ", GLint\ " "xoffset" ", GLint\ " "yoffset" ", GLsizei\ " "width" ", GLsizei\ " "height" ", GLenum\ " "format" ", GLsizei\ " "imageSize" ", const\ GLvoid\ *\ " "data" ");" .HP \w'void\ glCompressedTextureSubImage2D('u .BI "void glCompressedTextureSubImage2D(GLuint\ " "texture" ", GLint\ " "level" ", GLint\ " "xoffset" ", GLint\ " "yoffset" ", GLsizei\ " "width" ", GLsizei\ " "height" ", GLenum\ " "format" ", GLsizei\ " "imageSize" ", const\ void\ *" "data" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the target to which the texture is bound for \fBglCompressedTexSubImage2D\fR function\&. Must be \fBGL_TEXTURE_1D_ARRAY\fR, \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Z\fR, or \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR\&. .RE .PP \fItexture\fR .RS 4 Specifies the texture object name for \fBglCompressedTextureSubImage2D\fR function\&. .RE .PP \fIlevel\fR .RS 4 Specifies the level\-of\-detail number\&. Level 0 is the base image level\&. Level \fIn\fR is the \fIn\fRth mipmap reduction image\&. .RE .PP \fIxoffset\fR .RS 4 Specifies a texel offset in the x direction within the texture array\&. .RE .PP \fIyoffset\fR .RS 4 Specifies a texel offset in the y direction within the texture array\&. .RE .PP \fIwidth\fR .RS 4 Specifies the width of the texture subimage\&. .RE .PP \fIheight\fR .RS 4 Specifies the height of the texture subimage\&. .RE .PP \fIformat\fR .RS 4 Specifies the format of the compressed image data stored at address \fIdata\fR\&. .RE .PP \fIimageSize\fR .RS 4 Specifies the number of unsigned bytes of image data starting at the address specified by \fIdata\fR\&. .RE .PP \fIdata\fR .RS 4 Specifies a pointer to the compressed image data in memory\&. .RE .SH "DESCRIPTION" .PP Texturing allows elements of an image array to be read by shaders\&. .PP \fBglCompressedTexSubImage2D\fR and \fBglCompressedTextureSubImage2D\fR redefine a contiguous subregion of an existing two\-dimensional texture image\&. The texels referenced by \fIdata\fR replace the portion of the existing texture array with x indices \fIxoffset\fR and xoffset + width \- 1, and the y indices \fIyoffset\fR and yoffset + height \- 1, inclusive\&. This region may not include any texels outside the range of the texture array as it was originally specified\&. It is not an error to specify a subtexture with width of 0, but such a specification has no effect\&. .PP \fIinternalformat\fR must be a known compressed image format (such as \fBGL_RGTC\fR) or an extension\-specified compressed\-texture format\&. The \fIformat\fR of the compressed texture image is selected by the GL implementation that compressed it (see \fBglTexImage2D\fR()) and should be queried at the time the texture was compressed with \fBglGetTexLevelParameter\fR()\&. .PP If a non\-zero named buffer object is bound to the \fBGL_PIXEL_UNPACK_BUFFER\fR target (see \fBglBindBuffer\fR()) while a texture image is specified, \fIdata\fR is treated as a byte offset into the buffer object\*(Aqs data store\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fIinternalformat\fR is of the generic compressed internal formats: \fBGL_COMPRESSED_RED\fR, \fBGL_COMPRESSED_RG\fR, \fBGL_COMPRESSED_RGB\fR, \fBGL_COMPRESSED_RGBA\fR\&. \fBGL_COMPRESSED_SRGB\fR, or \fBGL_COMPRESSED_SRGB_ALPHA\fR\&. .PP \fBGL_INVALID_ENUM\fR is generated by \fBglCompressedTexSubImage2D\fR if \fItarget\fR is \fBGL_TEXTURE_RECTANGLE\fR or \fBGL_PROXY_TEXTURE_RECTANGLE\fR\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fIimageSize\fR is not consistent with the format, dimensions, and contents of the specified compressed image data\&. .PP \fBGL_INVALID_OPERATION\fR is generated if parameter combinations are not supported by the specific compressed internal format as specified in the specific texture compression extension\&. .PP \fBGL_INVALID_OPERATION\fR is generated if a non\-zero buffer object name is bound to the \fBGL_PIXEL_UNPACK_BUFFER\fR target and the buffer object\*(Aqs data store is currently mapped\&. .PP \fBGL_INVALID_OPERATION\fR is generated if a non\-zero buffer object name is bound to the \fBGL_PIXEL_UNPACK_BUFFER\fR target and the data would be unpacked from the buffer object such that the memory reads required would exceed the data store size\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglCompressedTextureSubImage2D\fR if \fItexture\fR is not the name of an existing texture object\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglCompressedTextureSubImage2D\fR if the effective target is \fBGL_TEXTURE_RECTANGLE\fR\&. .PP Undefined results, including abnormal program termination, are generated if \fIdata\fR is not encoded in a manner consistent with the extension specification defining the internal compression format\&. .SH "ASSOCIATED GETS" .PP \fBglGetCompressedTexImage\fR() .PP \fBglGet\fR() with argument \fBGL_TEXTURE_COMPRESSED\fR .PP \fBglGet\fR() with argument \fBGL_PIXEL_UNPACK_BUFFER_BINDING\fR .PP \fBglGetTexLevelParameter\fR() with arguments \fBGL_TEXTURE_INTERNAL_FORMAT\fR and \fBGL_TEXTURE_COMPRESSED_IMAGE_SIZE\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 l c c c c c c c c c c c c. T{ \fBglCompressedTexSubImage2D\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{ \fBglCompressedTextureSubImage2D\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 \fBglActiveTexture\fR(), \fBglCompressedTexImage1D\fR(), \fBglCompressedTexImage2D\fR(), \fBglCompressedTexImage3D\fR(), \fBglCompressedTexSubImage1D\fR(), \fBglCompressedTexSubImage3D\fR(), \fBglCopyTexImage1D\fR(), \fBglCopyTexImage2D\fR(), \fBglCopyTexSubImage1D\fR(), \fBglCopyTexSubImage2D\fR(), \fBglCopyTexSubImage3D\fR(), \fBglPixelStore\fR(), \fBglTexImage2D\fR(), \fBglTexImage3D\fR(), \fBglTexSubImage1D\fR(), \fBglTexSubImage2D\fR(), \fBglTexSubImage3D\fR(), \fBglTexParameter\fR() .SH "COPYRIGHT" .PP Copyright \(co 1991\-2006 Silicon Graphics, Inc\&. Copyright \(co 2010\-2014 Khronos Group\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 1991-2006 Silicon Graphics, Inc. .br Copyright \(co 2010-2014 Khronos Group .br