Game Development Community

Is there a GFX version of glTranslate?

by Ryan Mick · in Torque Game Engine Advanced · 01/13/2009 (8:47 am) · 2 replies

I'm hoping that i'm not blind, but I could not find anything like the openGL call glTranslate. Is there a GFX equivilent? I would love it if GG would publish a doc on converting openGL to the new GFX system but I don't see that anytime soon. Any help would be greatly appreciated.

Ryan

#1
01/13/2009 (11:00 am)
I'm having the same issues, but this is what I'm currently doing:

MatrixF t(true);
  t.setPosition( Point3F( x, y, z ) );
  GFX->multWorld( t );

If you have a 3D object already, you can also just do
GFX->multWorld( getTransform() );

Make sure you use GFX->pushWorldMatrix(); before this and GFX->popWorldMatrix(); after your rendering code.

Hope this is the information you needed... if not, let me know and I can share some other horrible stuff I've done with GUI rendering.
#2
01/13/2009 (11:26 am)
Thanks William, you pretty much just confirmed what I had found in this thread . I will try it tonight and hope it works.