View Full Version : orthographics projection problem

11-01-2011, 02:13 PM
Dear Friends
In orthographics projection how this aspect ratio is maintained with respect to all 3 axes.

I have
minX, maxX, minY, maxY, minZ and maxZ and

Now how can I fit my geometry into screen maintaining the aspect ratio. Please give me some idea. Thanks for any help in advance. Thanks Sujan

11-01-2011, 02:45 PM
Just multiply "left" and "right" with aspect = screen_width/screen_heigth.

BTW: no search engine works with "glOrtho aspect ratio"?

11-02-2011, 08:49 AM
Is this correct ??
With this my model is not coming onto the screen properly. Can u tell me whats going wrong.

left_side = minX*AR; //AR = aspect ratio...
right_side = maxX*AR;
top_side = minY;
bottom_side = maxY;
near_side = minZ;
far_side = maxZ;