I’m creating a small 3d world and so far for moving around I have been just moving the camera using gluLookAt. Would using rotation and translation instead be any improvement in speed?
I don’t think doing several translation/rotation calls will improve the performance of your application. gluLookAt() does only one matrixmult with the modelview matrix. When you call glTranslate() once and glRotate() three times, once for each axis, you’ll have four matrix multiplications, which is, I think, more expensive.
I don’t know if you do your own rotations, but if so, you could even speedup your application by using look-up tables for the several sinus/cosinus computations (note: this can lead to some minor significance errors).
Hope this helps,
Daniel Palomo van Es
I have read in the red book that gluLookAt( ) is using gltranslate( ) and glRotate( )
as encapsulated functions.
Can I see your code?
download mesa and have a look at the source code they use for implementing gluLookAt