Original Post
When I first began learning 3D graphics programming, there were a number of optimizations that were fairly common in games and other applications where frame rate and speed were more important than precision. With the increases we''ve seen over the past few years in both processor speeds and in hardware acceleration via graphics cards, have some of these optimizations been rendered (no pun intended) obsolete? The ones I''m most interested in hearing peoples'' experiences with:
1) Doing floating point calculations using fixed point integers - for example, using a long to represent 16 bits on each side of the decimal. All the tutorials and code I see online for OpenGL uses GLfloats for all operations. Has hardware acceleration of OpenGL rendered this practice mostly obsolete, or can you still get significant speed gains without unacceptable precision loss?
2) Lookup tables. It seems like a few years ago, every 3D engine generated a sine and cosine lookup table, and sometimes a tangent lookup table. With projects, tutorials, and source code I''m finding online for OGL, I am not seeing much (any!) use of lookup tables. Obviously there is always, regardless of the state of the art, a point of diminishing returns. There is always some level of precision at which calculating the sine or cosine on the fly becomes more efficient than the lookup table.. have we reached the point where that is usually true for the level of precision needed in modern games, or is this considered a more obscure topic not appropriate to the level of a tutorial.
I''d also be interested in hearing peoples'' experiences with using routines such as glRotate as opposed to doing the transformations in your own code. It seems like the OGL translate and rotate (eg) functions would benefit from hardware acceleration when available, so rolling your own transformation code would be of little use, but I''m wondering if anyone has done any comparison to see if this is true.