GL_EXT_texture_format_BGRA8888

Supported Hardware

Series5, Series5XT, Series6, Series6XE, Series6XT

Valid APIs

OpenGL ES 1.x, 2.0, 3.x

Description

Typically, textures in OpenGL ES run in RGBA order; this extension adds BGRA8888 as a new format so that textures in this byte order can be used instead. This can be effectively simulated in OpenGL ES 2.0 and 3.0 by using texture swizzling when it is not supported. Whilst this extension should be preferentially used, GL_IMG_texture_format_BGRA8888 mirrors this extension and can be used when this is not available. Apple hardware exposes a variation on this extension: GL_APPLE_texture_format_BGRA888, which is identical except that when loading the texture, the internal format should be RGBA instead of being equivalent to the format.

Registry Link

http://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_format_BGRA8888.txt

Example

// Create a BGRA8888 texture 
glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT, 1024, 1024, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, pixelData);