Rene Dudfield wrote:
I too found my code was faster after I pulled out Push/Pop Matrices (simpler too). Such manipulations turned out to be more expensive than I expected at first glance; I didn't run any serious time tests (I was happy just that the code was simpler), but it sure felt like it was taking longer than setting and reading 16 floats should.Another thing which is faster... believe it or not... is to use
translate/rotate calls instead of pushing and popping the matrix.
glTranslatef(gx,gy,gz)
glRotatef(grot, grx ,gry ,grz)
drawBOB();
glRotatef(grot, -grx ,-gry ,-grz)
glTranslatef(-gx,-gy,-gz)
-Jasper