PDA

View Full Version : Need help with Translating



Ther
08-18-2005, 11:40 AM
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, 11:48 AM
insert a glLoadIdentity() after the call to glMatrixMode(GL_MODELVIEW).

memfr0b
08-18-2005, 11:45 PM
Also have a look at glPushMatrix and glPopMatrix.