sadhu
1
Hi ,
I am using the orthographic projection (glOrtho) .
If the width and height of the viewport are not equal , then my object getting distortion. So , how to make it correct.
How find the aspect ratio , if the projection is Orthographic.
Thak you.
sadhu
system
2
Hope this would be helpful.
aspect ratio=w/h;
if(w<= h)
glOrtho(-1.0, 1.0,-1.0/aspect, 1.0/aspect, -1.0,1.0);
else
glOrtho(-1.0aspect,1.0aspect,-1.0, 1.0, -1.0, 1.0);
Originally posted by sadhu:
[b]Hi ,
I am using the orthographic projection (glOrtho) .
If the width and height of the viewport are not equal , then my object getting distortion. So , how to make it correct.
How find the aspect ratio , if the projection is Orthographic.
Thak you.
sadhu[/b]