Saturday, April 29, 2006

 

glFixed

OES_ fixed_ point
Although some embedded systems provide native support for floating point values, most
do not, especially cell phones, where the power requirements for an FPU are too high.
However, noninteger values are critical to 3D graphics, so OpenGL ES provides the option
for implementations to support them via the OES_ fixed_ point core addition.
This extension adds a number of things to OpenGL ES. First, it adds two new types,
GLfixed and GLclampx. These types are effectively 32 bit integers treated as fixed point value
in an S15.16 format (see Chapter 4 for a detailed discussion of fixed point math).
Second, the glVertexPointer() , glColorPointer() , glNormalPointer() , and glTexCoordPointer()
functions are extended to accept GL_ FIXED as the type parameter, indicating an array of
type GLfixed.
Finally, functions that accept GLfloat or GLdouble parameters are modified to accept
GLfixed instead. These functions are suffixed with an “x”, even if the original function was
not suffixed with an “f” or “d”. A complete list of these functions is shown in Table 3.16.

Astle, Dave. OpenGL ES Game Development.
Boston, MA, USA: Course Technology, 2004. p 59.
http://site.ebrary.com.lt.ltag.bibl.liu.se/lib/linkoping/Doc?id=10065762&ppg=81

Copyright © 2004. Course Technology. All rights reserved.

Function


void glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz);
void glMultiTexCoord4x( GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q);
void glColor4x( GLfixed r, GLfixed g, GLfixed b, GLfixed a);
void glDepthRangex( GLclampx n, GLclampx f);
void glLoadMatrixx( const GLfixed m[ 16]);
void glMultMatrixx( const GLfixed m[ 16]);
void glRotatex( GLfixed angle, GLfixed x, GLfixed y, GLfixed z);
void glScalex( GLfixed x, GLfixed y, GLfixed z);
void glTranslatex( GLfixed x, GLfixed y, GLfixed z);
void glFrustumx( GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
void glOrthox( GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f);
void glMaterialx[ v]( GLenum face, GLenum pname, GLfixed param);
void glLightx[ v]( GLenum light, GLenum pname, GLfixed * params);
void glLightModelx[ v]( GLenum pname, GLfixed param);
void glPointSizex( GLfixed size);
void glLineWidthx( GLfixed width);
void glPolygonOffsetx( GLfixed factor, GLfixed units);
void glTexParameterx[ v]( GLenum target, GLenum pname, GLfixed param);
void glTexEnvx[ v]( GLenum target, GLenum pname, GLfixed param);
void glFogx[ v]( GLenum pname, GLfixed param);
void glSampleCoverage( GLclampx value, GLboolean invert);
void glAlphaFuncx( GLenum func, GLclampx ref);
void glClearColorx( GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha);
void glClearDepthx( GLclampx depth);

Astle, Dave. OpenGL ES Game Development.
Boston, MA, USA: Course Technology, 2004. p 60.
http://site.ebrary.com.lt.ltag.bibl.liu.se/lib/linkoping/Doc?id=10065762&ppg=82

Copyright © 2004. Course Technology. All rights reserved.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?