when using glOrtho is my camera always at (0,0,0) ?
can i change it using gluLookAt?
Please log in or register to post a reply.
you can change the modelview matrix but there isn`t much sense in using
gluLookAt in that situation is there ??? why do want to do that ???
i have an app that shows a map in 3d ih have 2 modes perspective and
in perspective u can move the map around and stuff and in ortho u see
the map from above.
i made a zoom button that moves the camera forword and backword using
gluLookAt , i works great in perspective but doesnt do anything in ortho
, i wonder how can i do it in ortho as well
assuming that the camera is at 0,0,0 you’d just have to move it back or
forth a little… i haven’t used glOrtho much in the past so i’m jsut
thats the point , in perspective it works , in ortho it does not
specify “not working”.
it is working. it does something. but not what you possibly expect.
explain/show what it does, and what it explain how it should look..
i press on the zoom button , the camera comes closer to the object (i
know that , because if i return to perspective mode i see the object
closer) bu i don see any differance on the sreen.
the object looks exactly the same in glOrtho no matter how many times i
zoom in or zoom out
no wonder. orhto has no perspecive =?> it will always look the same no
mather how near or far you are..
it’s not a bug, it’s a feature
That’s true davepermen. With the tutorial i’m sending this week you’ll
find out why exactly…
i didn’t say it was a bug , for me it is though.
is there any way around it?
yes. scale your scene, or the viewport (the width/height in the ortho)
to zoom, move the cam with glTranslate to.. move
works great thanks
To make it more clear, orthographic projection is actually perspective
projection at infinite distance. That is the reason, irrespective of if
you go near / far , it appears the same.
The field of view ( FOV) is really large and so it does not affect the
FOV , if you move a little bit further / not.
That is the reason why it does not work.