views:

305

answers:

2

I would have assumed that GL_FIXED was faster, but the iPhone docs actually say to use GL_FLOAT because GL_FIXED has to be converted to GL_FLOAT. Is it the same on Android? I suppose it varies by phone, but what about recent popular ones (Nexus One, Droid/Milestone, etc.)?

Bonus points: This appears to be completely undocumented (e.g. search google for GL_FIXED!) but where is the 'point' in GL_FIXED? I.e. how much is (GL_FIXED)1 worth?

+1  A: 

This has nothing to do with android, it will depend on the actual GPU in the telephone in question. Generally I would think that GL_FLOAT will be faster on modern GPUs.

Andreas Brinck
+2  A: 

Like Andreas says, which one is faster depends on the hardware rather than on the gl standard. In general, you can expect GL_FLOAT to probably be the better choice when true hardware acceleration is used. GL_FIXED will usually be faster if the work is done in software on a CPU with poor or zero support for floating point math.

GL_FIXED is a 32 bit format, using 16.16 semantics. So 1 as a GL_FIXED value would be 0x10000.

Alan