View Full Version : gluPerspective

10-12-2009, 07:57 AM
I almost feel bad on making this question, but i'm only now starting to look at OpenGL and 3D graphics. Hope that i don't say any nonsense.
For testing i'm using an image with 1360/2045. My orthognatic view is defined as:
Gl.glOrtho(0, 2500, 0, 2500, -4.0, 4.0)
the image is the image of a face and i want to use the "+" and "-" to amplify and minimizing the face, just like a camera lens. I'm trying to use
Glu.gluPerspective(180, (m_size.Height) / (m_size.Width), 0, 0)
and i'm trying other values for each parameter. When i change the far and near the image is not seen. The fovY doesn't seem to do anything in this case and the aspect ratio seems to change the image definition. What the previous instruction does is nothing else than looking at the down left side of the image, i think,... , because i'm not quit shure, once i cannot see all the image.
Anyone knows how i can amplify and minimize the image whithout resizing/changing the position of my vertexes?

My thanks in advanced

10-12-2009, 08:24 AM
do not mix glOrtho and gluPerspective.
You can do that :

start with scale = 1250;
Gl.glOrtho(-scale, scale, -scale, scale, -4.0, 4.0)
changing scale will do the zoom.

Have a read through this :