GL_OES_matrix_get#

Supported Hardware#

Series5, Series5XT, Series6, Series6XE, Series6XT

Valid APIs#

OpenGL ES 1.x

Description#

This extension is specifically targeted at platforms where only fixed-point functionality is supported on the CPU, but data may be represented internally to a GPU as floating-point. In these cases, an application developer is only able to query floating-point matrices via glGetFixedv, which will result in a loss of information. To work around this, this extension allows floating point matrices to be queried back from the hardware by packing each floating-point value into an integer instead, using the IEEE 754 floating point representation. This value can then be queried using glGetIntegerv, using a number of new “float as int” tokens for affected matrix types.

Note#

This functionality is core to OpenGL ES 2.0 and 3.0.

Example#

// Get the values of the projection matrix that was previously loaded into OpenGL ES, but with
// the floating point bits stored as integers (for systems that don't support floats)
GLint projectionMatrix[16];
glGetIntegerv(GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES, projectionMatrix);