glCompressedTexImage2D

specify a two-dimensional texture image in a compressed format

Signature

glCompressedTexImage2D( GLenum ( target ) , GLint ( level ) , GLenum ( internalformat ) , GLsizei ( width ) , GLsizei ( height ) , GLint ( border ) , GLsizei ( imageSize ) , const GLvoid * ( data ) )-> void
glCompressedTexImage2D( target , level , internalformat , width , height , border , data )

Parameters

VariablesDescription
target
Specifies the target texture. Must be GL_TEXTURE_2D , GL_PROXY_TEXTURE_2D , GL_TEXTURE_1D_ARRAY , GL_PROXY_TEXTURE_1D_ARRAY , GL_TEXTURE_CUBE_MAP_POSITIVE_X , GL_TEXTURE_CUBE_MAP_NEGATIVE_X , GL_TEXTURE_CUBE_MAP_POSITIVE_Y , GL_TEXTURE_CUBE_MAP_NEGATIVE_Y , GL_TEXTURE_CUBE_MAP_POSITIVE_Z , GL_TEXTURE_CUBE_MAP_NEGATIVE_Z , or GL_PROXY_TEXTURE_CUBE_MAP .
level
Specifies the level-of-detail number. Level 0 is the base image level. Level n is the n th mipmap reduction image.
internalformat
Specifies the format of the compressed image data stored at address data .
width
Specifies the width of the texture image. All implementations support 2D texture and cube map texture images that are at least 16384 texels wide.
height
Specifies the height of the texture image. All implementations support 2D texture and cube map texture images that are at least 16384 texels high.
border
This value must be 0.
imageSize
Specifies the number of unsigned bytes of image data starting at the address specified by data .
data
Specifies a pointer to the compressed image data in memory.