shetlandbob
01-14-2004, 06:41 AM
Hi, I'm fairly new to this game so bear with me.
I have a 3D CAD system which I'm developing and am switching between orhto and perspective views. The switch works but the zoom is wrong and doesn't zoom (in and out) at the ssame rate as in ortho.
I've included the basic code below (where x and y are width and height)
glMatrixMode ( GL_PROJECTION );
glLoadIdentity();
gluPerspective ( 45.0, x / y, 0.00001, 100 * graphics.maxDim );
glMatrixMode ( GL_MODELVIEW );
glLoadIdentity();
Is there anything else that I need to do to get the switch to work properly??
Any help much appreacited
Cheers
I have a 3D CAD system which I'm developing and am switching between orhto and perspective views. The switch works but the zoom is wrong and doesn't zoom (in and out) at the ssame rate as in ortho.
I've included the basic code below (where x and y are width and height)
glMatrixMode ( GL_PROJECTION );
glLoadIdentity();
gluPerspective ( 45.0, x / y, 0.00001, 100 * graphics.maxDim );
glMatrixMode ( GL_MODELVIEW );
glLoadIdentity();
Is there anything else that I need to do to get the switch to work properly??
Any help much appreacited
Cheers