Hi!
I've been following these tutorials, and I was wondering if it was possible to modify this tutorial to allow for zooming:
iPhone Development: OpenGL ES From the Ground Up, Part 3: Viewports in Perspective
I just want to zoom in and out using a slider.
I'm thinking by modifying this piece of code:
Code:
CGRect rect = view.bounds;
GLfloat size = .01 * tanf(DEGREES_TO_RADIANS(45.0) / 2.0);
glFrustumf(-size, // Left
size, // Right
-size / (rect.size.width / rect.size.height), // Bottom
size / (rect.size.width / rect.size.height), // Top
.01, // Near
1000.0); // Far
I should be able to achieve what I want. But I need some guidance!
Thanks for your time!