Jump to content
  • Advertisement

Archived

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

xyz

2d: wrong sizes...

This topic is 5538 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!