Results 1 to 2 of 2

Thread: Nested Push/Pop Matrx()

  1. #1
    Member Contributor
    Join Date
    Apr 2000
    Location
    Staten Island New York
    Posts
    53

    Nested Push/Pop Matrx()

    Do nested Push/Pop Matrix calls work from the inside out? or vice-versa?
    Should the Identity matrix be called before
    every Push/Pop to avoid cumalative results?
    Or what is the result of doing so?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,502

    Re: Nested Push/Pop Matrx()

    The matrix stacks use LIFO logic. The last matrix pushed will be the first matrix to pop off. Each matrix type uses its own matrix stack, so texture matrices don't get mixed with modelview matrices for example.
    You do not need to load an identity matrix before issuing a push or a pop. Popping a matrix loads a matrix from the stack, not multiplies by it. Pushing a matrix leaves the matrix unchanged. You must also be aware of the maximum depth each stack can be, to prevent overflowing the stack.

Similar Threads

  1. Parallelizing nested loops
    By Otterz in forum OpenCL
    Replies: 1
    Last Post: 02-15-2011, 10:52 AM
  2. Nested Asset
    By Rasson in forum COLLADA
    Replies: 5
    Last Post: 11-10-2010, 04:16 AM
  3. nested FBO render to texture? RT1(RT2(), RT2())?
    By Zarniwoop in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 07-04-2010, 02:08 PM
  4. Nested Clipping
    By Protoss in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-02-2008, 08:46 AM
  5. Nested FBO's slowdown
    By eldritch in forum OpenGL: Advanced Coding
    Replies: 9
    Last Post: 01-18-2007, 03:26 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