PDA

View Full Version : problem in glScaled



06-19-2003, 11:33 PM
Hi
I have a problem in scaling

I have an object in 3d space(view using glLookAt)

I used the following commands for zoom in

zoom function()
{
glScaled(5,5,5);
glutPostRedisplay();
}

There is no "zoom in" effect of the object

can anybody tell me where I went wrong?

thanks in advance

errno
06-20-2003, 01:46 AM
in your display function, you may reset modelview matrix to identity (glLoadIdentity) before call gluLookAt. so your scale is erased.

you should do in zoom:
zoom_enabled = true;

and in your display function, after gluLookAt:
if (zoom_enabled) glScale(...)