Scott_I

11-14-2005, 11:17 AM

I'm working on an exercise where I'm keeping total track of the PROJECTION and MODELVIEW matrix stacks myself using my own data structures, and updating the actual PROJECTION/MODELVIEW matrix only when needed using glLoadMatrix()

I've done the necessary functions for modifying the MODELVIEW matrix (my own glrotate, gltranslate, glscale, glPop, glPush "type" functions), and its working as expected.

I'm not sure about projection matrix... What happens to the PROJECTION matrix when the following is done:

glMatrixMode(PROJECTION);

glLoadIdentity(); //obvious here..

glOrtho3d(); //but what about after this?

Could anyone give me some hints as to how to set up the PROJECTION matrix. Or maybe a link to where I could learn more about it?

Thanks.

I've done the necessary functions for modifying the MODELVIEW matrix (my own glrotate, gltranslate, glscale, glPop, glPush "type" functions), and its working as expected.

I'm not sure about projection matrix... What happens to the PROJECTION matrix when the following is done:

glMatrixMode(PROJECTION);

glLoadIdentity(); //obvious here..

glOrtho3d(); //but what about after this?

Could anyone give me some hints as to how to set up the PROJECTION matrix. Or maybe a link to where I could learn more about it?

Thanks.