Posted 05 July 2001 - 08:06 AM
I am currently trying to optimize my hierarchical object transformation pipeline.
I'm using the typical approach:
.. object specific transformation goes here
.. render object
OK, now which one is faster:
glTranslatef(Object->T.x, Object->T.y, Object->T.z)
glRotatef(Object->R.angle, Object->R.x, Object->R.y, Object->R.z)
glScalef(Object->S.x, Object->S.y, Object->S.z)
... render it
or this one:
... render object
I personally like the second one, it has lower overhead and less memory references, but I read somewhere, that glMultMatrix and glLoadMatrix are quite slow ?
And what about the performance of glPushMatrix and glPopMatrix ? I assume that on newer 3d cards with hardwired t&l this should be implemented in hardware and therefore very fast ?
A.H aka Blueshift
Edited by - Blueshift on July 5, 2001 3:09:15 PM