Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OpenGL getmatrix()?

128 views
Skip to first unread message

Andrew T Duchowski

unread,
Sep 29, 1997, 3:00:00 AM9/29/97
to

Is there any way to get a copy of the top level matrix a la iris gl's
getmatrix() call?
--
Andrew T Duchowski office:HRBB.414A
Computer Science Dept., MS-3112 phone:409/845.9980 fax:409/847.8578
Texas A&M University mailto:and...@cs.tamu.edu
College Station, TX 77843-3112 http://www.cs.tamu.edu/people/andrewd

Martin Knoblauch

unread,
Sep 29, 1997, 3:00:00 AM9/29/97
to and...@cs.tamu.edu
Andrew,

have a look at "glGetFloatv" with first parameters being:

GL_COLOR_MATRIX_SGI
GL_MODELVIEW_MATRIX
GL_PROJECTION_MATRIX
GL_TEXTURE_MATRIX

Of course, you should know which matrix mode you are in to
decide which of them you want.

Martin
--
+---------------------------------+-----------------------------------+
|Martin Knoblauch | Silicon Graphics GmbH |
|Manager Technical Marketing | Am Hochacker 3 - Technopark |
|Silicon Graphics Computer Systems| D-85630 Grasbrunn-Neukeferloh, FRG|
|---------------------------------| Phone: (+int) 89 46108-179 or -0 |
|http://reality.sgi.com/knobi | Fax: (+int) 89 46107-179 |
+---------------------------------+-----------------------------------+
|e-mail: <kn...@munich.sgi.com> | VM: 6-333-8179 | M/S: IDE-3150 |
+---------------------------------------------------------------------+

Paul Martz

unread,
Sep 29, 1997, 3:00:00 AM9/29/97
to

Andrew T Duchowski (and...@cs.tamu.edu) wrote:
: Is there any way to get a copy of the top level matrix a la iris gl's
: getmatrix() call?

GLfloat pmat[16], mmat[16], tmat[16];
glGetFloatv (GL_PROJECTION_MATRIX, pmat);
glGetFloatv (GL_MODELVIEW_MATRIX, mmat);
glGetFloatv (GL_TEXTURE_MATRIX, tmat);

That code will return the top of the three matrix stacks.
--
-paul ma...@shaft.fc.hp.com
Hewlett Packard Graphics Products Lab

"Technology can be used for good or evil. Please use only for good."

0 new messages