Jump to content
  • Advertisement
Sign in to follow this  
xshado

OpenGL how to translate OpenGL to Direct3D

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

Excuse me ^^ Is there any tool that can automatically translate an OpenGL application program into a Direct3D application program? If there is none, does anyone list the corresponding functions between the OpenGL functions and Direct3D functions so that I can use them to manually translate an OpenGL application program into a Direct3D application program? Thank you very much for your help.

Share this post


Link to post
Share on other sites
Advertisement
While certainly possible, such a tool does not exist to the best of my knowledge..
Something similar was Scitech GLDirect ( a few years ago ) which was an opengl driver that was implemented atop of Direct3D so any OpenGL Program could run using D3d Drivers. But a static source code translation program does not exist.


GL and D3D use different methodlogies. While OpenGL is strictly procedural, D3D is COM based and thus functionality is encapsulated into interface classes. A straight function to function mapping is not possible this way, your best bet would be to write a wrapper that maybe exposes all GL functions with a different prefix like dglBegin or something and internally then calls on D3D Interfaces.

You should check out the D3d Reference documentation in its SDK, downloadable from Microsoft, it contains a complete reference on all interfaces and methods.

Share this post


Link to post
Share on other sites
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!