GL_EXT_read_format_bgra

Supported Hardware

Series6, Series6XE, Series6XT

Valid APIs

OpenGL ES 1.1, OpenGL ES 2.0, OpenGL ES 3.x

Description

This extension adds additional formats that can be used when calling glReadPixels. Specifically it allows the format "BGRA_EXT" to be paired with UNSIGNED_BYTE, UNSIGNED_SHORT_4_4_4_4_REV_EXT or UNSIGNED_SHORT_5_5_5_1_REV_EXT, giving alternative byte/bit-ordering schemes for the returned pixels.

Example

// Read pixel data back as BGRA8888 
GLubyte returnedData[width * height * 4]; 
glTexStorage2D(0, 0, width, height, GL_BGRA_EXT, GL_UNSIGNED_BYTE, (GLvoid*)returnedData);