I have a code in which you can switch between perspective and orthographics projections. in perspective one can simply zoom on the model by translating along the screen Z axis; this clearly will not work in ortho and in ortho i use scaling. since i am using two different methods to perform zooming, when i then switch between the ortho and perspective projections the model is usually not visible.
how can i do the zooming consistently in the two projection modes ? should i use glFrustum and glOrtho directly; any example code would be very helpful.
moving the camera is actually “dollying”. to zoom in perspective, change the field of view (fov), which is the angle of the frustum.
then you could equate the ortho view to a box aligned with the direction of the perspective camera. when the fov is widened or narrowed, the ortho view should expand or contract.
Hi
The following function helps to zoom it. When I enlarge,a part of the object is invisible. Is there any method to put scroll bars to reach any part of screen.