[glu3-devel] Matrix stack

Ian Romanick idr at freedesktop.org
Sat Mar 6 15:50:47 PST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks to the thread on Phoronix[1], I was reminded about the matrix
stack implementation.  In glu3.h there is a structure definition for
GLUmat4Stack, but there is no supporting code.  I put this in as a
placeholder back in the early days of GLU3 thinking that I would come
back to it eventually.  There are a couple issues that I never resolved,
and these prevented me from finishing the implementation.

In "classic" OpenGL, the matrix stack was the only way to operate on
matrices.  Performing an operation on a matrix and performing an
operation on the top of a matrix stack looked the same to the
application developer.  I want to do the same with the GLU3 matrix
stack, but I'm not sure how to do that.  Specifically, I want someone to
be able to take code written to use a GLUmat4 and convert it to using a
GLUmat4Stack by just changing the types and vice versa.

Also in "classic" OpenGL the matrix stack has a fixed size.  I always
had mixed feelings about that.  On the one hand you don't really want
the matrix stack to grow without bound.  That's almost always a sign of
an application bug.  On the flip side, whatever bound is chosen is going
to be insufficient for some legitimate use and will waste memory for
some other legitimate use.

Thoughts or opinions?

1: http://www.phoronix.com/forums/showthread.php?t=22289
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuS6lYACgkQX1gOwKyEAw9J+wCfaoQYS8inmRG/cYIOvYdNd81+
Q/wAoIqOnQ30R8EYUapYOW13HxS5ovtF
=KzGW
-----END PGP SIGNATURE-----


More information about the GLU3-devel mailing list