Results 1 to 2 of 2

Thread: glPushMatrix and glPopMatrix?

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2001
    Location
    New York, NY, US
    Posts
    11

    glPushMatrix and glPopMatrix?

    Can somebody do me a favor to tell me:
    1) If I use glPushatrix, how can I make
    a Matrix? I mean, is it an array?
    2) If Matrix is an array, how can I
    retrieve every element in the matrix
    and put them back to the array
    with glPopMatrix?

    Thanks a lot and have a nice day!

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: glPushMatrix and glPopMatrix?

    It's automatic. glPushMatrix will push the current matrix onto the top of the stack. glPopMatrix takes the top matrix on the stack and makes it the current matrix. There's no need to get the actual matrix to use these. If you needed the matrix for other reasons, you can get it using glGetFloatfv, but unless you REALLY need to get the matrix, I'd avoid doing that. Getting information back from OpenGL like that works, but you will take a performance hit.
    Deiussum
    Software Engineer and OpenGL enthusiast

Similar Threads

  1. glPushMatrix() & glPopMatrix()
    By innermostsanctum in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-16-2006, 10:48 AM
  2. glpushmatrix and glpopmatrix
    By jesh in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-18-2003, 05:42 AM
  3. How to use glPushMatrix and glPopMatrix?
    By Structural in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-22-2002, 05:43 AM
  4. glPopMatrix, glPushMatrix??
    By sar22 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-24-2002, 02:10 AM
  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