RE: [info-performer] pfGetViewMat and pfGetProjMat

Date view Thread view Subject view Author view

From: Dick Rous (dick++at++sgi.com)
Date: 01/13/2005 02:10:10


There IS a difference.
Matrices in Performer are represented in row-major form,
while OpenGL uses a column-major ordering.
So, to go from Performer to OpenGL (or vice versa), you have to transpose
the pfMatrix.
 
Eg, a translation matrix in Performer looks like:

1 0 0 0
0 1 0 0
0 0 1 0
x y z 1

While in OpenGL this is represented as:

1 0 0 x
0 1 0 y
0 0 1 z
0 0 0 1

Hope this helps,

Dick.

> -----Original Message-----
> From: owner-info-performer++at++performer.engr.sgi.com
> [mailto:owner-info-performer++at++performer.engr.sgi.com] On
> Behalf Of faculaganymede
> Sent: Wednesday, 12 January, 2005 17:33
> To: SGI Performer MailList
> Subject: [info-performer] pfGetViewMat and pfGetProjMat
>
> Hi All,
>
> Inside the channel draw call back function, I am making some
> calls to read the current projection and viewing matrices. I
> get different results from
> glGetFloatv() and the pfGet$_Mat() functions; the values of
> the returned matrices are different. Does anyone know why? I
> thought these two functions are equilvalent!?
>
> Code fragment:
> ...
> pfDraw();
>
> // GL
> GLfloat projMatD[16];
> GLfloat modelViewMatD[16];
> glGetFloatv(GL_PROJECTION_MATRIX, projMatD);
> glGetFloatv(GL_MODELVIEW_MATRIX, modelViewMatD);
>
> // PF
> pfMatrix ViewMat;
> pfMatrix ProjMat;
> pfGetViewMat(ViewMat);
> pfGetProjMat(ProjMat);
> ...
>
> =====
> Thanks,
> faculaganymede
>
>
>
> __________________________________
> Do you Yahoo!?
> All your favorites on one personal page - Try My Yahoo!
> http://my.yahoo.com
>
> --------------------------------------------------------------
> ---------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> --------------------------------------------------------------
> ---------
>


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Jan 13 2005 - 02:08:22 PST