Tools/Resources to Convert DirectX Code to OpenGL

directx, opengl

Solution

The concepts are very similar, but the APIs are very different between DirectX and OpenGL. Automatic conversion is not going to be very straightforward...

Personally, if I had a project and was trying to convert from one solution to the other, I would actually try to convert to a rendering library that supports both, such as Ogre, Irrlicht, or a commercial engine. This way, you can support both DX and OpenGL in one code base.

Problem

Are there any tools and/or documentation providing a mapping from DirectX to OpenGL? If you had to do a conversion, how would you approach it and what would you use? I know that ATI Technologies provides HLSL2GLSL, but my understanding is that this is just for shader languages and not a full coverage of the APIs.

Original source