Why does DirectX use a left-handed coordinate system

directxmathopengl

I considered posting on Stack Overflow, but the question strikes me as being far too subjective since I can't think of a reasonable technical explanation for Microsoft's choice in this matter. But this question has bugged me for so long and the issue keeps coming up in one of my projects, and I have never actually seen an attempt at explaining this:

OpenGL uses a right-handed coordinate system, where the +Z part of the world coordinate system extends toward the viewer.

DirectX uses a left-handed system where the +Z part of the world coordinate extends into the screen, away from the viewer.

I never used the Glide API, so I don't know how it worked, but from what I can gather, it uses a left-handed system as well.

Is there a technical reason for this? And if not, is there some conceptual advantage to a particular handedness of a coordinate system? Why would one choose one over the other?

Best Answer

I know this is an old post, but I saw this post being referenced and dislike the chosen answer's tone.

So I did a bit of investigation!

  1. DirectX is old. It was first released in 1995, when the world had much more than Nvidia and ATI, DirectX vs OpenGL. That's over 15 years, people.
  2. 3dfx Interactive's Glide (one of DirectX's competitors back in the day. OpenGL wasn't meant for gaming back then) used a left-handed coordinate system.
  3. POV-Ray and RenderMan (Pixar's rendering software), also use a left-handed coordinate system.
  4. DirectX 9+ can work with both coordinate systems.
  5. Both WPF and XNA (which work with DirectX under the scenes) use a right-handed coordinate system.

From this, I can speculate about a couple things:

  • Industry standards aren't as standard as people like.
  • Direct3D was built in a time everyone did things their own way, and the developers probably didn't know better.
  • Left-handedness is optional, but customary in the DirectX world.
  • Since conventions die out hard, everyone thinks DirectX can only work with left-handedness.
  • Microsoft eventually learned, and followed the standard in any new APIs they created.

Therefore, my conclusion would be:

When they had to choose, they didn't know of the standard, chose the 'other' system, and everyone else just went along for the ride. No shady business, just an unfortunate design decision that was carried along because backward compatibility is the name of Microsoft's game.