Results 1 to 2 of 2

Thread: glLoadIdentity

  1. #1
    Member Newbie
    Join Date
    Jul 2002
    Location
    Edinburgh,Scotland,United Kingdom
    Posts
    34

    glLoadIdentity

    Can anyone tell me please why do we use glLoadIdentity. I am fully aware that we get identity matrix by calling the function but why do we need to call it all the time? I'd really appreciate if someone could explain this in simple English.

    Suf.

  2. #2
    Member Contributor
    Join Date
    Jun 2002
    Posts
    68

    Re: glLoadIdentity

    Calling glLoadIdentity is like washing a painters brush.

    While rendering/painting a scene, your matrix/brush will be stained with the current transformation/color you last used.

    Before rendering/painting another scene, it is wise to clear your matrix/wash your brush.

    Of course you don't have to call glLoadIdentity/wash your brush, but then I think you can guess what might happen.

    NOTE: You can also use glPushMatrix(), before rendering and glPopMatrix() after to avoid calling glLoadIdentity(), its like having extra brushes for each color.

Similar Threads

  1. glLoadIdentity(), glTranslatef()?
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-01-2004, 07:04 AM
  2. glloadidentity
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-21-2002, 11:09 AM
  3. Display lists and glLoadIdentity();
    By sw@T in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 10-11-2002, 08:30 PM
  4. Replies: 5
    Last Post: 12-06-2001, 10:08 PM
  5. glLoadIdentity
    By in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 04-17-2001, 04:33 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