5

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?

Timmmm
  • 88,195
  • 71
  • 364
  • 509

2 Answers2

8

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
  • 4,897
  • 2
  • 24
  • 17
1

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
  • 51,293
  • 14
  • 84
  • 114