Jump to content
  • Advertisement
Sign in to follow this  
coderchris

OpenGL Dealing with different coordinate systems across API's

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

In directx, the coordinate system places (0,0) at the top left both for rendering and texture coordinates. +Z is also oriented into the screen. For opengl on the other hand, everything that I mentioned is reversed. My question is, in a cross platform engine, how does one gracefully handle these issues? An example of where this issue is particularly bad is in specifying texture coordinates. In your vertex shader (Im using CG btw), you have to flip your texture coordinates depending on what API is being used...

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!