Hi,
I want to implement the zoom function of a camera so I intend to change the parameter of glPerspective(). Before calling this function, how can I get the current angle of FOV of OpenGL setting?? Thx!
William
Hi,
I want to implement the zoom function of a camera so I intend to change the parameter of glPerspective(). Before calling this function, how can I get the current angle of FOV of OpenGL setting?? Thx!
William
you need the near plane and whether the left and button or right and top values.
fovx = arctan(right/near);
fovy = arctan(top/near);
=> fovx = aspect_ratio*fovy
mostly aspect_ratio = 4/3.
regards,
jan