I am writing an app for Android, using OpenGL ES 1.x, but I would like answers which include iOS devices and OpenGL ES 2.x.
I am confused as to whether I should use GL开发者_如何学Go_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..
For all iOS devices, GL_FIXED has no redeeming value. It is useful on many lower-end Android devices which do not have a floating point unit in the CPU, but iOS devices have always shipped with full floating point support. On iOS, FIXED data is converted to Float32 before any other processing is done. I do not know what happens for Android.
精彩评论