GL_IMG_texture_compression_pvrtc

Supported Hardware

Series5, 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. PVRTC is PowerVR's proprietary texture compression format which achieves high quality, full RGBA compression at data rates of 2 or 4 bits per pixel. Textures are restricted to being square, with power of two dimensions - though typically rectangular textures are often supported; there is no way to query for this.

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 (http://www.imgtec.com/powervr/insider/powervr-pvrtextool.asp)

Registry Link

http://www.khronos.org/registry/gles/extensions/IMG/IMG_texture_compression_pvrtc.txt

Example

// Upload a 4bpp PVRTC1 texture, RGBA and RGB are uploaded in the same way. 
GLuint bitsPerPixel = 4; 
glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG, 1024, 1024, 0, (width*height*bitsPerPixel)/8, pixelData); 
// Upload a 2bpp PVRTC1 texture, RGBA and RGB are uploaded in the same way. 
GLuint bitsPerPixel = 2; 
glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG, 1024, 1024, 0,
                        (width*height*bitsPerPixel)/8, pixelData);