PDA

View Full Version : Need help with Translating



Ther
08-18-2005, 12:40 PM
this the part of my program, where i draw:


glEnable (GL_TEXTURE_2D )
glBindTexture ( ... )
glMatrixMode ( MODEL_VIEW )
glTranslate3f ( xt, yt, zt )
glCallList ( ... );
My problem is that if i move more times, then the transletes are addtogether! Who can I set the translate matrix every time? :)

Aeluned
08-18-2005, 12:48 PM
insert a glLoadIdentity() after the call to glMatrixMode(GL_MODELVIEW).

memfr0b
08-19-2005, 12:45 AM
Also have a look at glPushMatrix and glPopMatrix.