'\" t .\" Title: glGetCompressedTexImage .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 05/30/2012 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLGETCOMPRESSEDTEXIM" "3G" "05/30/2012" "[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" glGetCompressedTexImage \- return a compressed texture image .SH "C SPECIFICATION" .HP \w'void\ glGetCompressedTexImage('u .BI "void glGetCompressedTexImage(GLenum\ " "target" ", GLint\ " "lod" ", GLvoid\ *\ " "img" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies which texture is to be obtained\&. \fBGL_TEXTURE_1D\fR, \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_3D\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, and \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR are accepted\&. .RE .PP \fIlod\fR .RS 4 Specifies the level\-of\-detail number of the desired image\&. Level 0 is the base image level\&. Level n is the nth mipmap reduction image\&. .RE .PP \fIimg\fR .RS 4 Returns the compressed texture image\&. .RE .SH "DESCRIPTION" .PP \fBglGetCompressedTexImage\fR returns the compressed texture image associated with \fItarget\fR and \fIlod\fR into \fIimg\fR\&. \fIimg\fR should be an array of \fBGL_TEXTURE_COMPRESSED_IMAGE_SIZE\fR bytes\&. \fItarget\fR specifies whether the desired texture image was one specified by \fBglTexImage1D\fR() (\fBGL_TEXTURE_1D\fR), \fBglTexImage2D\fR() (\fBGL_TEXTURE_2D\fR or any of \fBGL_TEXTURE_CUBE_MAP_*\fR), or \fBglTexImage3D\fR() (\fBGL_TEXTURE_3D\fR)\&. \fIlod\fR specifies the level\-of\-detail number of the desired image\&. .PP If a non\-zero named buffer object is bound to the \fBGL_PIXEL_PACK_BUFFER\fR target (see \fBglBindBuffer\fR()) while a texture image is requested, \fIimg\fR is treated as a byte offset into the buffer object\*(Aqs data store\&. .PP To minimize errors, first verify that the texture is compressed by calling \fBglGetTexLevelParameter\fR() with argument \fBGL_TEXTURE_COMPRESSED\fR\&. If the texture is compressed, then determine the amount of memory required to store the compressed texture by calling \fBglGetTexLevelParameter\fR() with argument \fBGL_TEXTURE_COMPRESSED_IMAGE_SIZE\fR\&. Finally, retrieve the internal format of the texture by calling \fBglGetTexLevelParameter\fR() with argument \fBGL_TEXTURE_INTERNAL_FORMAT\fR\&. To store the texture for later use, associate the internal format and size with the retrieved texture image\&. These data can be used by the respective texture or subtexture loading routine used for loading \fItarget\fR textures\&. .SH "ERRORS" .PP \fBGL_INVALID_VALUE\fR is generated if \fIlod\fR is less than zero or greater than the maximum number of LODs permitted by the implementation\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fBglGetCompressedTexImage\fR is used to retrieve a texture that is in an uncompressed internal format\&. .PP \fBGL_INVALID_OPERATION\fR is generated if a non\-zero buffer object name is bound to the \fBGL_PIXEL_PACK_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_PACK_BUFFER\fR target and the data would be packed to the buffer object such that the memory writes required would exceed the data store size\&. .SH "ASSOCIATED GETS" .PP \fBglGetTexLevelParameter\fR() with argument \fBGL_TEXTURE_COMPRESSED\fR .PP \fBglGetTexLevelParameter\fR() with argument \fBGL_TEXTURE_COMPRESSED_IMAGE_SIZE\fR .PP \fBglGetTexLevelParameter\fR() with argument \fBGL_TEXTURE_INTERNAL_FORMAT\fR .PP \fBglGet\fR() with argument \fBGL_PIXEL_PACK_BUFFER_BINDING\fR .SH "SEE ALSO" .PP \fBglActiveTexture\fR(), \fBglCompressedTexImage1D\fR(), \fBglCompressedTexImage2D\fR(), \fBglCompressedTexImage3D\fR(), \fBglCompressedTexSubImage1D\fR(), \fBglCompressedTexSubImage2D\fR(), \fBglCompressedTexSubImage3D\fR(), \fBglReadPixels\fR(), \fBglTexImage1D\fR(), \fBglTexImage2D\fR(), \fBglTexImage3D\fR(), \fBglTexParameter\fR(), \fBglTexSubImage1D\fR(), \fBglTexSubImage2D\fR(), \fBglTexSubImage3D\fR() .SH "COPYRIGHT" .PP Copyright \(co 1991\-2006 Silicon Graphics, Inc\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&.