Cathy L.

2013-09-24 08:47:35 UTC

Hello

I am switching from the old OpenGL (with glTranslate, glRotate,

glBegin/End, etc...) to the new (3.3) method calculating my own matrices

(with the help of GLM), so I work on matrices order for

projection/view/model.

I understand that it is done this way:

Mmodelview=Mview * Mmodel

M=Mprojection * Mmodelview

with often Mviewmodel this order:

Mviewmodel=Mtranslation * Mrotation * Mscale

I decided to check if that is really done this way, so I made several

transformations with the old method and check with

glGetFloatv(GL_MODELVIEW_MATRIX,&fMatrix); at each step.

The problem is that if I:

glLoadIdentity();

glRotatef(45,0,1,0); // let's call it Mry

glRotatef(10,1,0,0); // Mrx

glGetFloatv(GL_MODELVIEW_MATRIX,&fMatrix);

the result in fMatrix is like fMatrix was Mry * Mrx. So the old OpenGL

is multiplying to the right the new matrix?

Thanks for the help

Cathy L.

I am switching from the old OpenGL (with glTranslate, glRotate,

glBegin/End, etc...) to the new (3.3) method calculating my own matrices

(with the help of GLM), so I work on matrices order for

projection/view/model.

I understand that it is done this way:

Mmodelview=Mview * Mmodel

M=Mprojection * Mmodelview

with often Mviewmodel this order:

Mviewmodel=Mtranslation * Mrotation * Mscale

I decided to check if that is really done this way, so I made several

transformations with the old method and check with

glGetFloatv(GL_MODELVIEW_MATRIX,&fMatrix); at each step.

The problem is that if I:

glLoadIdentity();

glRotatef(45,0,1,0); // let's call it Mry

glRotatef(10,1,0,0); // Mrx

glGetFloatv(GL_MODELVIEW_MATRIX,&fMatrix);

the result in fMatrix is like fMatrix was Mry * Mrx. So the old OpenGL

is multiplying to the right the new matrix?

Thanks for the help

Cathy L.