PDA

View Full Version : OpenGL|ES 1.0 sample are not support Fixed-point



m933040045
05-09-2005, 10:27 PM
I'v trace the codes of OpenGL|es 1.0 sample and found that although it has fixed function like translatex() ...,but actually when fixed-point value pass to the function, the value conver back to float to count,as follow:

glScalex(GLfixed x, GLfixed y, GLfixed z) {
__gl_matrixf_t m;
__gl_mk_identity(m);

//__GL_X_2_F mean fixed to float
__M(0,0) = __GL_X_2_F(x); //here!
__M(1,1) = __GL_X_2_F(y); //here!
__M(2,2) = __GL_X_2_F(z); //here!
__gl_update_mtx(m);
}

so ? since OpenGL|ES is support fixed-point why it happened ? Where can I find the real OpenGL|es which support fixed-point?
Thank for your attention...thank you very much!

KristofBeets
05-10-2005, 01:51 AM
Are you talking about the behaviour of OGLES wrappers ? Most of those will probably map Fixed Point into Floating Point ASAP for ease of implementation, this does mean you can not necessarily see the true impact of the loss of accuracy which can occur when using fixed point maths.

One option is to move to a real fixed point device with OGLES support such as the Dell AximX50v which only supports fixed point entry points, or alternatively implement your own fixed point maths and only pass the data onto the wrapper at the last moment for rendering.

K-

hmwill
05-10-2005, 03:35 AM
Or, in case you are looking for sources, there is Vincent Mobile 3D Rendering Library (http://sourceforge.net/projects/ogl-es).

- HM