?
Solved

Why to choose DirectX or OpenGL?

Posted on 2003-03-13
5
Medium Priority
?
493 Views
Last Modified: 2010-04-07
Hello

I'm just starting to learn some programming languages; I've started with C and actually I'm in C++, and I'm planning to move on a graphics language, such as DirectX or OpenGL. But I don't know their differences, don't know why to choose one or another.

Thanks in advance, I'll be waiting for your replies
0
Comment
Question by:MrSotomonte
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 4

Expert Comment

by:joachimc
ID: 8135937
Their similarities are bigger than their differences. DX has a strong support from MS and openGL from the open source community.

If you only program for windows I would probably choose DX. Otherwise openGL is the obvious choice.

There is not a real answer to this question so I am not expecting 80 points for this one :)
0
 

Accepted Solution

by:
errorx666 earned 240 total points
ID: 8136035
DirectX is Microsoft-specific, meaning it will work only on Microsoft platforms, and OpenGL is cross-platform, portable to a number of different systems.  Both have strong support and extensive documentation and both accomplish essentially the same things.  DirectX uses COM interfaces, which organize it but also complicate it somewhat (there are half a bajillion different interfaces and classes and methods to remember); OpenGL is somewhat simpler, using a set of functions and data types to do the same things.  I would agree with jachimc that for Windows DirectX seems best and otherwise OpenGL.
0
 

Expert Comment

by:Maxmike
ID: 8149186
Basically DirectX is more windows dependant, but offers more features as far as sound and graphics.  If you plan on doing anything strictly windows go with this.

For everything else, there's OpenGL, it's open source as the other guys said, so it offers more flexability at the expense of a few bells and whistles.
0
 

Author Comment

by:MrSotomonte
ID: 8153998
Well, thanks for your replies, I've found them all useful.

I think I've posted this on the wrong section and I've spend too much points on this ambiguous question as I'm new on the community, but from now on I'll try to do it OK.

I'll be posting more questions soon as I get more points :)

Thanks again
0
 

Expert Comment

by:ThomasLoader
ID: 8156871
I think that the main issues have been asked. I can only add a few considerations. I don't think there is a 'wrong' choice.
Differences
Speed
-Some cards will run games at very different speeds depending on the choice of OpenGL or DirectX.
EG On a Voodoo2 state changes were very cheap in OpenGl, but very expensive in DirectX.
The way that you use each will affect the speed and you won't be able to just 'replace function names' and use your old engine to change from one to the other.
Coding style
-I have heard that OpenGL is 'more elegant' than DirectX, and from my experience DirectX is a little bit of a mess, however once you have worked out your basic setup you will forget most of that pain.
-Future of your program.
Do you want to port your code to a non-MS OS (choose openGL) or maybe the Xbox (DirectX)?

Frmm my knowledge of DirectX (some programming) and OpenGL (theorectical, read a few books) you wouldn't be wrong choosing either. The theory is practically the same and if I were looking for a good DirectX coder I think I'd be better off getting someone with good OpenGl experience and helping them rather than getting an inexperienced DirectX coder, if you see what I mean.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month10 days, 11 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question