Results 1 to 4 of 4

Thread: glPushMatrix() and glPopMatrix

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2001

    glPushMatrix() and glPopMatrix

    I was just wondering if anyone could explain the functions of glPushMatrix() and glPopMatrix? I see them in my book but can't understand what they are there for.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2000

    Re: glPushMatrix() and glPopMatrix

    Those are used to save/restore the matrix.

    They are used for local effects, so instead of having it affect all the objects in the scene, it only affects the current object.

  3. #3

    Re: glPushMatrix() and glPopMatrix

    I have also wondered how to handle popmatrix and pushmatrix.

    Say that :
    When I call popmatrix am I reseting my modelview matrix and then when I call Popmatrix I return to my original modelview matrix ? Or something like that ?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000

    Re: glPushMatrix() and glPopMatrix

    When you call glPushMatrix, you push a copy of the current matrix to the top of the stack, leaving the current matrix untouched so you can continue to add transformations to it. When you call glPopMatrix, you replace the current matrix with the matrix on the top of the stack.

Similar Threads

  1. glpushmatrix and glpopmatrix
    By jesh in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-18-2003, 05:42 AM
  2. How to use glPushMatrix and glPopMatrix?
    By Structural in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-22-2002, 05:43 AM
  3. glPopMatrix, glPushMatrix??
    By sar22 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-24-2002, 02:10 AM
  4. glPushMatrix and glPopMatrix?
    By newmannium in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-01-2001, 12:02 PM
  5. glPushMatrix() & glPopMatrix()
    By glbeginner in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-07-2001, 10:23 PM

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