Hardware T & L

How exactly does hardware tranformation and lighting work. (im mainly interested in the transformation)

I try using this

  1. Set the translation
  2. Rotate the object
  3. use glGetFloatV(GL_MODELVIEW_MATRIX,mat) to get the transformed matrix.

is this method classed as using hardware transformation? or is it some other way?

All OpenGL programs that doesn’t try to calculate everything on it’s own will use the any T&L capabilities of the graphic adapter. However, i’m am not sure if the actual calculation of the matrixes are done in hardware of these accelerators.

Whether or not a given OpenGL transform call uses hardware T&L is up to the driver and the hardware. It’s transparent to the programmer.

AFAIK hardware T&L isn’t so much about calculating the transforms (e.g. glRotate, glMultMatrix) as about transforming the vertices you issue by the current modelview matrix. Which isn’t something you do explicitly anyway - it happens whenever you call glVertex etc.