GL_OES_fixed_point¶
Supported Hardware¶
Series5, Series5XT, Series6, Series6XE, Series6XT
Valid APIs¶
OpenGL ES 1.x
Description¶
This extension provides fixed point functions for hardware that supports the OpenGL ES 1.x common profile but has inefficient floating-point support. The functions provided are equivalent to the Common-Lite profile and are denoted by ending in an “x” instead of an “f” for floating-point functions. Fixed point values are unsigned integers that are scaled to a S15.16 representation. The S15.16 representation means that there is one sign bit, the top 15 bits represent integer values, and the bottom 16 bits represent values below zero. In essence, it represents a signed short with 16 bits of sub-zero values.
Registry Link¶
http://www.khronos.org/registry/gles/extensions/OES/OES_fixed_point.txt
Example¶
// Use the fixed-point version of a function to scale by 1.0, 0.5 and 2.0 in the x, y and z
// axes respectively. The value "65536" is effectively treated as 1.0.
GLfixed x = 65536;
GLfixed y = 65536 / 2;
GLfixed z = 65536 * 2;
glScalex(x, y, z);