glCompressedTexImage1D, glCompressedTexImage2D, glCompressedTexImage3D, glCompressedTexSubImage1D, glCompressedTexSubImage2D, glCompressedTexSubImage3D, glGetCompressedTexImage, glGetCompressedTextureImage, glReadPixels
Copyright© 2014 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
Page generated by adrdox
glGetCompressedTextureSubImage: man4/glGetCompressedTextureSubImage.xml
glGetCompressedTextureSubImage can be used to obtain a sub-region of a compressed texture image instead of the whole image, as long as the compressed data are arranged into fixed-size blocks of texels. texture is the name of the texture object, and must not be a buffer or multisample texture. The effective target is the value of GL_TEXTURE_TARGET for texture. level and pixels have the same meaning as the corresponding arguments of glCompressedTexSubImage3D. bufSize indicates the size of the buffer to receive the retrieved pixel data. 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 0 GL_TEXTURE_CUBE_MAP_POSITIVE_X 1 GL_TEXTURE_CUBE_MAP_NEGATIVE_X 2 GL_TEXTURE_CUBE_MAP_POSITIVE_Y 3 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 4 GL_TEXTURE_CUBE_MAP_POSITIVE_Z 5 GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 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.