GL_IMG_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. GL_EXT_texture_format_BGRA8888 mirrors this extension and should be preferentially used. 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.

Example#

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