GL_IMG_texture_compression_pvrtc2#

Supported Hardware#

Series5XT, Series6, Series6XE, Series6XT

Valid APIs#

OpenGL ES 1.x, 2.0, 3.x

Description#

Compressed textures are a core part of modern rendering solutions, enabling much more texture content to be pushed and with greater performance due to the lower bandwidth and memory requirements. PVRTC2 is PowerVR’s proprietary texture compression format which achieves high quality, full RGBA compression at data rates of 2 or 4 bits per pixel. PVRTC2 is related to the original PVRTC format but adds a number of additional features which allow it to improve further on the original’s quality levels. In particular, textures with arbitrary dimensions are now supported, and there is a hard edge mode which can improve areas of high discontinuity and non-tiled textures.

This extension specifically enables supported devices to use these textures directly, often dramatically improving performance over uncompressed textures. This extension does not enable compression of these textures as it is too computationally expensive; this can be done on Desktop platforms with PVRTexTool.

Example#

// Upload a 4bpp PVRTC2 texture
GLuint bitsPerPixel = 4;
glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG, 1024, 1024, 0, (width*height*bitsPerPixel)/8, pixelData);
// Upload a 2bpp PVRTC2 texture
GLuint bitsPerPixel = 2;
glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG, 1024, 1024, 0,
                            (width*height*bitsPerPixel)/8, pixelData);