GL_OES_query_matrix

Supported Hardware

Series5, Series5XT, Series6, Series6XE, Series6XT

Valid APIs

OpenGL ES 1.x

Description

This extension allows a user to query a matrix in a type independent of the underlying implemented value, by returning the mantissa and exponent of each matrix value separately. This solves a similar issue to OES_matrix_get, but in a slightly more flexible way. The mantissa value is returned as an S15.16 fixed point value, and the exponents are returned as integers. It works similarly to the C function "modf". This extension relies on either the Common-Lite profile or the GL_OES_fixed_point extension to provide the definition of a fixed-point value.

Note

This functionality is core to OpenGL ES 2.0 and 3.0.

Registry Link

http://www.khronos.org/registry/gles/extensions/OES/OES_query_matrix.txt

Example

// Get the project matrix back as separate exponents and mantissas 
// Set the projection matrix stack as the current matrix mode 
glMatrixMode(GL_PROJECTION); 
// Get the exponents and mantissa values of the projection matrix that was previously loaded 
// into OpenGL ES 
GLfixed projectionMatrixMantissas[16]; 
GLint projectionMatrixExponents[16]; 
glQueryMatrixxOES(projectionMatrixMantissas, projectionMatrixExponents);