'\" t .\" Title: glCompressedTexImage1D .\" 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 "GLCOMPRESSEDTEXIMAGE" "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" glCompressedTexImage1D \- specify a one\-dimensional texture image in a compressed format .SH "C SPECIFICATION" .HP \w'void\ glCompressedTexImage1D('u .BI "void glCompressedTexImage1D(GLenum\ " "target" ", GLint\ " "level" ", GLenum\ " "internalformat" ", GLsizei\ " "width" ", GLint\ " "border" ", GLsizei\ " "imageSize" ", const\ GLvoid\ *\ " "data" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the target texture\&. Must be \fBGL_TEXTURE_1D\fR or \fBGL_PROXY_TEXTURE_1D\fR\&. .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 \fIinternalformat\fR .RS 4 Specifies the format of the compressed image data stored at address \fIdata\fR\&. .RE .PP \fIwidth\fR .RS 4 Specifies the width of the texture image\&. All implementations support texture images that are at least 64 texels wide\&. The height of the 1D texture image is 1\&. .RE .PP \fIborder\fR .RS 4 This value must be 0\&. .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 \fBglCompressedTexImage1D\fR loads a previously defined, and retrieved, compressed one\-dimensional texture image if \fItarget\fR is \fBGL_TEXTURE_1D\fR (see \fBglTexImage1D\fR())\&. .PP If \fItarget\fR is \fBGL_PROXY_TEXTURE_1D\fR, no data is read from \fIdata\fR, but all of the texture image state is recalculated, checked for consistency, and checked against the implementation\*(Aqs capabilities\&. If the implementation cannot handle a texture of the requested texture size, it sets all of the image state to 0, but does not generate an error (see \fBglGetError\fR())\&. To query for an entire mipmap array, use an image array level greater than or equal to 1\&. .PP \fIinternalformat\fR must be an extension\-specified compressed\-texture format\&. When a texture is loaded with \fBglTexImage1D\fR() using a generic compressed texture format (e\&.g\&., \fBGL_COMPRESSED_RGB\fR) the GL selects from one of its extensions supporting compressed textures\&. In order to load the compressed texture image using \fBglCompressedTexImage1D\fR, query the compressed texture image\*(Aqs size and format using \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\&. .PP If the compressed data are arranged into fixed\-size blocks of texels, the pixel storage modes can be used to select a sub\-rectangle from a larger containing rectangle\&. These pixel storage modes operate in the same way as they do for \fBglTexImage1D\fR()\&. In the following description, denote by bs, bw, bh, and bd the values of pixel storage modes \fBGL_UNPACK_COMPRESSED_BLOCK_SIZE\fR, \fBGL_UNPACK_COMPRESSED_BLOCK_WIDTH\fR, \fBGL_UNPACK_COMPRESSED_BLOCK_HEIGHT\fR, and \fBGL_UNPACK_COMPRESSED_BLOCK_DEPTH\fR, respectively\&. bs is the compressed block size in bytes; bw, bh, and bd are the compressed block width, height, and depth in pixels\&. .PP By default the pixel storage modes \fBGL_UNPACK_ROW_LENGTH\fR, \fBGL_UNPACK_SKIP_ROWS\fR, \fBGL_UNPACK_SKIP_PIXELS\fR, \fBGL_UNPACK_IMAGE_HEIGHT\fR and \fBGL_UNPACK_SKIP_IMAGES\fR are ignored for compressed images\&. To enable \fBGL_UNPACK_SKIP_PIXELS\fR and \fBGL_UNPACK_ROW_LENGTH\fR, bs and bw must both be non\-zero\&. To also enable \fBGL_UNPACK_SKIP_ROWS\fR and \fBGL_UNPACK_IMAGE_HEIGHT\fR, bh must be non\-zero\&. To also enable \fBGL_UNPACK_SKIP_IMAGES\fR, bd must be non\-zero\&. All parameters must be consistent with the compressed format to produce the desired results\&. .PP When selecting a sub\-rectangle from a compressed image, .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} the value of \fBGL_UNPACK_SKIP_PIXELS\fR must be a multiple of bw .RE .PP \fIimageSize\fR must be equal to: .PP b s \(mu width b w .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fIinternalformat\fR is not a supported specific compressed internal formats, or is one 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_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_VALUE\fR is generated if \fIborder\fR is not 0\&. .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 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_NUM_COMPRESSED_TEXTURE_FORMATS\fR .PP \fBglGet\fR() with argument \fBGL_COMPRESSED_TEXTURE_FORMATS\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. T{ \fBglCompressedTexImage1D\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(), \fBglCompressedTexImage2D\fR(), \fBglCompressedTexImage3D\fR(), \fBglCompressedTexSubImage1D\fR(), \fBglCompressedTexSubImage2D\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 2011\-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 2011-2014 Khronos Group .br