Zooming using Orthographic projection

Hi,
I have created an orthographic projection:

glOrtho( Left, Right, Bottom, Top, Near, Far)

I zoom into it by adjusting Left, Right, Bottom and Top. I leave Near and Far alone.
Is this the only way to zoom into a Ortho view?

It does not work well for me, especially when Bottom and top get close to equalling each other.

Any help gratefully appreciated.

MacSam

You could just append a glScale() after the glOrtho().

glOrtho() essentially subtracts the maximum and minimum values in each dimension to determine the scale. If you’re constructing the values as centre-size and centre+size, then you’ll lose accuracy when size is small compared to centre. In that case, it would be better to just construct the projection matrix using glTranslate() and glScale() (or even just glLoadMatrix()).

[QUOTE=GClements;1280678]You could just append a glScale() after the glOrtho().

glOrtho() essentially subtracts the maximum and minimum values in each dimension to determine the scale. If you’re constructing the values as centre-size and centre+size, then you’ll lose accuracy when size is small compared to centre. In that case, it would be better to just construct the projection matrix using glTranslate() and glScale() (or even just glLoadMatrix()).[/QUOTE]

Thank you.

MacSam

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.