directx Vs OpenGL

Started by
5 comments, last by Boder 19 years, 3 months ago
whats better to learn first?
Advertisement
Depends on your needs and your programming style.
Oh no... you have broken the infamous, golden, triple reinforced with aluminum-copper, rule #8 (Read forum faq)

In a nutshell, though, if you plan to develop for windows, you can use either. If you plan to develop for other operating systems, you have no choice but OpenGL, since DirectX is windows-only.

There are other differences (or so I've heard), but I only know DirectX.
.:<<-v0d[KA]->>:.
SDL and Allegro are a few others. But I'm a DirectX fan so I stick with it. But I'm also an OpenGL fan so I use it too sometimes. I guess it boils down to what I want to playwith at the moment.

See, if you want to learn DirectX you also have to learn Win32. But you don't have to learn Win32 if you use OpenGL because you can use GLUT. Leaving you with more time to just code a game.
Take back the internet with the most awsome browser around, FireFox
There are many differences between how DirectX works and OpenGL works. Having programed in both, I consider the basics of OpenGL to be easier to learn. However, due to the extension system in OpenGL, I also found it more difficult to access its advanced features. DirectX, however, while a little more difficult to pick up, allowed ready access to advanced stuff. It also comes with a large number of tutorials for multiple languages, and a free library of all DirectX functions and structures in the documentation. So, if you want everything immediately and free, and are willing to spend the time to learn the basics (which means wading through the large amount of documentation), go DirectX. If you don't mind spending the money for a book or two, you can easily get the OpenGL libraries and good explanations on the basics, get started right away, then later learn the ins and outs of the extension system.
DirectX is not equivalent to OpenGL, Direct3D is.
Other than that, take what v0dKA said, any further than that could initiate a flame war.
If you go OGL: GL Framework and OpenGL Window Framework

Also, Direct3D and all of DX has a C++ style API, while OpenGL has a C style API.

This topic is closed to new replies.

Advertisement