void glGetCompressedTextureSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
For cube map textures, the behavior is as though glGetCompressedTexImage were called once for each requested face (selected by zoffset and depth, as described below) with target corresponding to the requested texture cube map face as indicated by the table presented below. pixels is offset appropriately for each successive image.
|Layer number||Cube Map Face|
xoffset, yoffset and zoffset indicate the position of the subregion to return. width, height and depth indicate the size of the region to return. These arguments have the same meaning as for glCompressedTexSubImage3D, though there are extra restrictions, described in the errors section below.
The mapping between the xoffset, yoffset, zoffset, width, height and depth parameters and the faces, layers, and layer-faces for cube map, array, and cube map array textures is the same as for glGetTextureSubImage.
The xoffset, yoffset, zoffset offsets and width, height and depth sizes must be multiples of the values of GL_PACK_COMPRESSED_BLOCK_WIDTH, GL_PACK_COMPRESSED_BLOCK_HEIGHT, and GL_PACK_COMPRESSED_BLOCK_DEPTH respectively, unless offset is zero and the corresponding size is the same as the texture size in that dimension.
Pixel storage modes are treated as for glGetCompressedTexSubImage. The texel at (xoffset, yoffset, zoffset) will be stored at the location indicated by pixels and the current pixel packing parameters.
GL_INVALID_OPERATION error is generated if the buffer size required to store the requested data is greater than bufSize.
GL_INVALID_OPERATION error is generated if the texture compression format is not based on fixed-size blocks.
GL_INVALID_VALUE error is generated if texture is not the name of an existing texture object.
GL_INVALID_VALUE is generated if xoffset, yoffset or zoffset are negative.
GL_INVALID_VALUE is generated if xoffset + width is greater than the texture's width, yoffset + height is greater than the texture's height, or zoffset + depth is greater than the texture's depth.
GL_INVALID_VALUE error is generated if the effective target is GL_TEXTURE_1D and either yoffset is not zero, or height is not one.
GL_INVALID_VALUE error is generated if the effective target is GL_TEXTURE_1D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE and either zoffset is not zero, or depth is not one.
GL_INVALID_VALUE error is generated if xoffset, yoffset or zoffset is not a multiple of the compressed block width, height or depth respectively.
GL_INVALID_VALUE error is generated if width, height or depth is not a multiple of the compressed block width, height or depth respectively, unless the offset is zero and the size equals the texture image size.
|Function / Feature Name||2.0||2.1||3.0||3.1||3.2||3.3||4.0||4.1||4.2||4.3||4.4||4.5|