Skip to main content
GameDev.net gamedev.net
🔒 Locked

why directX

Started by cplus programmer Nov 7, 2004 at 12:16 PM 8 replies 1.1k views
Original Post
cplus programmer
cplus programmer
I am asking this as a question, not an arguement, eferyone that I have talked to has said that it isnt good. the only thing I can find bad about it is that it is windows only. is there an advantage over opengl?
there are 10 types of people in this world, those who can do bianary and those who cant.
nagromo
nagromo
If you want to use it on multiple platforms use OpenGL. Otherwise flip a coin.

You could also look at sample code and see what style you like better, but they do the same things at the same speed.
cplus programmer
cplus programmer
k, it sounds like opengl will be my choice (I care about cross-platform)
there are 10 types of people in this world, those who can do bianary and those who cant.
Pipo DeClown
Pipo DeClown
DirectX is an SDK. It has API's beyond Direct3D, while OpenGL is just a graphics API.
Then why would you pick Direct3D over OpenGL? You would not, if you had no preference. Here are some facts:

DirectX (thus Direct3D) is updated (mostly) yearly. New features have to wait a few months 'till they get included into the SDK.
OpenGL, on the other hand, only need a new version of the header with extensions, and a driver update for your graphicscard (of course, Direct3D needs that too).

This difference however, is just a hypothesis. In the real world, the updates are almost always around the same time. OpenGL might be a month earlier, but Direct3D will have a final working version, which all drivers should fully support.

So the only real thing you have to consider is coding style and documentation. What I've learned from my experience, the DirectX SDK is documented very well. You can find references, articles and tutorials of quality.
OpenGL has a lot of resources too, but I've not found all of them as user-friendly. But I really have to admit, OpenGL is easier to learn for a new programmer: it uses a C-style method. The API is accessed through function calls, where the DirectX API's are accessed through objects (classes).

I suggest you try both out. If you want to see quick results, learn OpenGL. Never look down to the other API, since it's just a preference of style.
Promit
Promit
It's worth noting the irony that while OpenGL is initially easier, you will quickly become buried when you need to write your own matrix math library in order to get anything useful done. Not to mention X models are really neat.

D3D gives you a lot more control over what's going on at various levels. As of late, OpenGL has gotten close to the same level...but not quite. More importantly, I've found more and more that the consistency of the OpenGL API is gradually falling apart. The OpenGL 2.0 spec is entirely unremarkable -- it wasn't the "redesign" that 3dfx promised. The only really interesting thing in it is the addition of GLSL. Everything else is just extensions that have been standardised.

But, you said cross-platform is important to you, which basically forces you to use OpenGL. So there you go.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Pipo DeClown
Pipo DeClown
Quote:
Original post by Promit
But, you said cross-platform is important to you, which basically forces you to use OpenGL. So there you go.

Hehehe! While DirectX is forcing you to use Windows, other OSes are forcing you to use OpenGL. That's something I've never really noticed. [grin]
circlesoft
circlesoft
Quote:
Original post by Pipo DeClown
DirectX (thus Direct3D) is updated (mostly) yearly. New features have to wait a few months 'till they get included into the SDK.
For reference for future SDK releases, this both correct and incorrect. SDKs will now be released an a regular 3-month basis, with the next release coming in December. These SDK's will have include new managed functionality, new samples, and D3DX updates. Don't expect the runtime (Direct3D itself) to be updated that much, though (if it's going to updated at all - I forget if MS has a 9.0d even planned).

I think one of the best things that Direct3D has over OpenGL is that it is actively under major development. Microsoft is pouring a lot of resources into WGF 1.0 and 2.0, since they are going to be the groundwork of Longhorn's presentation model, Avalon. A large change in architecture is being implemented that aims to take advantage of these new graphics cards.
circlesoft
circlesoft
Quote:
Original post by Promit
Not to mention X models are really neat.
I'd say that's about the extent of it - they're "neat". When it comes to any kind of animation, X pretty much falls flat on it's face. The format in general just needs to be redesigned, so a new D3DX-integrated format and it's associated interfaces are being planned for DX10/WGF2/XNA/whatever-you-wanna-call-it. Of course, there are 3rd party libraries out there now (few seem to present an implementation that is flexible, easy-to-use, and freeware, though - but that's my goal [smile]).
cplus programmer
cplus programmer
though I am not going to either for a while, I am using sdl, I cant even make a game of pong yet.
there are 10 types of people in this world, those who can do bianary and those who cant.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.