Results 1 to 3 of 3

Thread: Need help with Translating

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2005
    Location
    Budapest (Hungary,Europe)
    Posts
    26

    Need help with Translating

    this the part of my program, where i draw:
    Code :
     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?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2004
    Location
    Long Island, New York
    Posts
    569

    Re: Need help with Translating

    insert a glLoadIdentity() after the call to glMatrixMode(GL_MODELVIEW).

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jul 2005
    Location
    Berlin, Germany
    Posts
    188

    Re: Need help with Translating

    Also have a look at glPushMatrix and glPopMatrix.
    355/113 -- Not the famous irrational number PI, but an incredible simulation!

Similar Threads

  1. rotating and translating
    By gleps in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 08-22-2010, 10:52 PM
  2. Translating from a quaternion?
    By mikeynovemberoscar in forum OpenGL: General
    Replies: 10
    Last Post: 02-17-2010, 03:53 AM
  3. Help with translating initials??
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-25-2006, 05:51 PM
  4. Translating an object
    By Robin Forster in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-06-2003, 10:29 AM
  5. Translating problems
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 06-28-2001, 04:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean