Sign in to follow this  
giugio

OpenGL [c++ opengl]zoom in and out

Recommended Posts

Hy. I would implement a zoom box for enlarge/shrink my 3dmodel. I'already create a box function that return me x,y,width and height. For near/far i would use the keyboard + and -. Thanks.

Share this post


Link to post
Share on other sites
I try to implement the zoom with gllookat:

gluLookAt(0.0, 0.0, -10.0,fx,fy,fz, 0.0, 1.0, 0.0);

the position of the camera is 0,0,-10 , and the center is at fx,fy,fz.
fx,fy,fz can be choose from user but i can't understand how set with and height.


thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this