Archived

This topic is now archived and is closed to further replies.

xyz

2d: wrong sizes...

Recommended Posts

Hi, Take a look at these pics: sc01.jpg sc02.jpg sc03.jpg in the first pic, the distance between the horizontal lines is 0.1, and the distance between the vertical lines is also 0.1... however it doesn''t look like, why? This "problem" can also be noticed in the other two pics, where the drawing is flattened when is applied a rotation of 90º... How can I make the sizes equal? Thanks

Share this post


Link to post
Share on other sites
The problem is that OpenGL isn''t working in screen coordinates, but an independant coordinate-system. To display things everything gets scaled by a certain factor.
Since that''s a floating point operation there''ll be rounding errors. That might result in lines ''jumping'' a little to the left and right.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You need to take the widht/height ratio into account when you create your view frustum. There are lots of examples of how to do it.

Share this post


Link to post
Share on other sites