Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am writing an app for Android, using OpenGL ES 1.x

I am confused as to whether I should use GL_FLOAT or GL_FIXED, the priority being performance regarding GPU operations(does GL_FIXED need to be converted etc. ex: GL_FIXED fits EXACTLY with the precision I need but if it is converted to a float then using it is pointless).

This book seems to say that it is ALWAYS preferable to use GL_FIXED for vertices: "The major exception is with vertex data, which should never be given in floating point..." Here (paragraph right above the subtitle "Vertex data")

But I have seen others saying floating point is better..

share|improve this question
    
Depends on the device. You should read your device's GPU docs. –  SurvivalMachine Jun 26 '12 at 19:05
add comment

1 Answer

up vote 3 down vote accepted

In commercial game development for TV game consoles, we never store vertex positions on disc or network as floats, because if more than 8 or 10 bits of precision is needed, a model can be subdivided until each piece requires only 8 or 10 bits.

So for speed of download or loading from a disc, floats lose out to fixed point.

As for speed of rendering, this is an issue only when vertex shading is bottlenecked by vertex buffer read bandwidth, which is actually not likely unless your vertices are really fat beyond just the position being 3x32 bits.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.