Opengl or Directx3d,what's your choice?

im a fresh man about opengl,and i usually work under windows,somebody told me that directx3d was better than opengl on interface of system,i wonder if somebody could give me some advices?:slight_smile:

What kind of applications? Are you concerned with portability?
Typical questions when you ask about OpenGL vs. Direct3D :slight_smile:

But I will ask two different questions: :wink:

What 3D hardware you gonna use and target?



Laptop embeded accelartors


What features are you interested in and on what operating system?

Windows XP?



Answer both and I will give you the right choice.

You have the following choices:

Direct3D 9
Direct3D 10 or 11

I would not recommend to use Direct3D 9, simply because it is outdated.

If you work exclusively on Windows Vista and Windows 7, i would recommend D3D 10/11. It really does not matter which one, they are mostly identical, switching from D3D10 to D3D11 is trivial.

If you consider to work on Linux or MacOS there is no other choice than OpenGL. So, even if right now you only work on Windows, but you’d like to keep the option to expand to those OSes sometime in the future, you should go with OpenGL.

If you work on Windows XP, or at least want your app to run on it, it’s also a good idea to choose OpenGL, because from Direct3D only D3D 9 runs on XP.

Other than that it’s a tough question. Feature-wise both OpenGL and D3D11 mostly provide the same functionality with only slight differences, that won’t matter to a beginner.

I have started with OpenGL 10 years ago and found it very friendly to beginners back then. Today i’m not so sure about that anymore, in my opinion OpenGL has become quite a mess. However, right now i am learning D3D 11 and find it quite hard to get used to, maybe because i am so much used to how OpenGL does things, but i think that it is not very beginner friendly. But then again, 3D programming IS difficult. No matter which API you choose, you definitely have to work hard for a few days, to get to know how all that stuff works.


I agree with Jan.

Flexibility and feature accessibility on all platforms is OpenGL.

Go for OpenGL, it rocks! This is the feature.

If it were that easy…

Depending on the hardware one wants to target it may even be necessary to use D3D9. In all honesty, D3D10 is a dead end thanks to Microsoft’s infinitely stupid decision to make it Vista+ only.

So in order to do any sufficient market saturation with D3D you’d need a D3D10 path, a ‘modern’ D3D9 path so that XP users aren’t left out and a fallback path for older hardware. That’s something a big company can afford that has millions to throw at a project but for anything smaller scale this alone makes D3D a non-option to me right now.

fine,i got it,thanks for your careful advices,Glfreak,Jan and Ketracel White:)

Well, you have to see it from a beginners perspective, not from a professional game developers.

If you want to target D3D9 HARDWARE, you can still do that with D3D11 (of course not with D3D10).

But if you are starting to learn 3D programming NOW, you really don’t care about market share and such stuff. So, the only question is, do YOU use XP (or your friends). Do YOU want to have it run on XP NOW ? If you say “no” to that question, there is really no sense in using D3D9 to learn 3D programming.

If we were talking about which API a professional engine, such as the Unreal Engine, or id Tech 5 should use, then there are of course other factors to consider. But frankly, that was really not the point of this discussion.


Well,maybe i cared too much on professional field,as a beginner i just know i love 3D programming,that’s enough. I’ve done several Opengl programs these two days, and i like its language style. Im glad to join you into the 3D world through Opengl.


Neither API is better than the other, they have broadly compatible feature sets and unless you’re purely doing tech demos the API-specific code in your program is probably going to be a very small part of it.

Key questions to consider are (roughly in order of importance):

Is portability important for you? If the answer here is “yes” then you have no choice but to use OpenGL.

Will you have driver quality issues? The sad truth is that OpenGL driver quality (with the exception of NVIDIA) sucks; if you attempt to do anything beyond the basics you will likey be spending time on vendor-specific workarounds. It’s a disgrace that even 2010 Intel drivers can still lock up your machine necessitating a hard reboot.

What’s you’re preferred coding style? C++/OOP folks may just feel more comfortable with D3D.