Jump to content
  • Advertisement

Archived

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

Deadman55

Perspective? Orthog?

This topic is 5615 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

Which method do you use if we''re talking 2D games? Because with perspective you get the weird coordinate screw-up using glRasterPos!

Share this post


Link to post
Share on other sites
Advertisement
if you;re talking about the inverted Y coordinate thing they you''ll have that no matter what. just write your setRaster function to take that into account.

so if you want the coords to start in the lower left,

y = screenHeight - y;

-me

Share this post


Link to post
Share on other sites
quote:

If you want 2D, then you HAVE to use the Ortho mode, and make all your vertex have the Z set as 0


Since 2D is a special case of 3D, you can do 2D with a perspective matrix aswell. Just make sure you draw everything in the same Z-plane. Well, it''s even possible to do 2D with a perspective matrix with object on different Z-planes. As long as you know what you do and you get the result you want, it''s OK. It just happens to be a little bit easier with an orthographic matrix if you can''t understand the perspective matrix fully, but if you can, there''s no difference.

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!