If you were writing the next 3d graphics intensive application in C# (like a 3d modelling and animation software), which one would be a better choice?
If we consider C# as platform independent, then OpenGL seems tempting, but what about the performance, etc?
Since the used language is C#, the performance is pretty crucial to consider.
Edit: You can also consider SlimDX and TAO, OpenTK, csGL, etc too.
I'd recommend OpenGL for the following reasons :-
That said, the requirements of your system and your personal preferences could tip it either way as both approaches are solid implementations. On the downside OpenGL is very much a state machine and can be tricky to fit into OO, although it's certainly not impossible.
EDIT: Added to clarify my comment on the OpenGL shader model being inherently superior to DirectX. This is because DirectX shaders are compiled with the program at development time against a generic GPU model, whereas OpenGL shaders are held as source code and compiled by the OpenGL driver at run time. Consequently theoretically it's possible for the driver writer to take advantage of specific (or updated when running an old program) features of the GPU and create compiled code that can run faster than DirectX shaders. It's a small point, but potentially quite an important one.
Here is my honest suggestion for you: Make use of both.
Advice
I would any day weigh which one has more tools available to finishing a program, and then for performances reason, I would make use of the other in order to ensure maximum performance on different systems.
Thoughts on the debate
Let us review: The performance of the program depends on many things, mainly your effort (the application's code) and the drivers on the given computer. Graphics APIs are a mean for your application to communicate to the GPU, and thus makes you incredibly dependent on how well a given driver is implemented for installed GPU.
My choice
Direct3D is sometimes faster on some graphics card than OpenGL, and that is because of graphics vendors and their drivers.
DirectX offers plenty of tools to speed up development. I realize it has a very steep learning curve to begin with, but allow me to remind, that you happen to be a programmer. I even dare to say a very good one.
Conclusion
Therefore you must be able to fight your way in and slowly developing your own framework that utilizes both APIs and thus make you capable of testing and implementing whatever program you have in mind.
Sincerely,
Mossa Nova Merhi
In terms of performance both are practically the same, your code and design will be the mayor factor affecting speed. Additionally, both APIs are well mantained (in comparison to 5 years ago when dx was much ahead).
In this cases, one option is to choose based on your philosophy and the philosophy behind each API.
Some might need a comercial focus; sell software, invert money, do business. Coming from a business enviroment, where money can speed things up, dx might be well suited for this cases where you can get interesting deals with microsoft at capacitations and developing tools, among other things.
On the other hand, OpenGL is an Open Standard, this means that people can discuss/evaluate and contribute to improve the standard API that will be for the benefit of society in the first place guaranteed. This is more compatible with a scientific approach where the goal might be publish a research, release free software, make a comunnity and get feedback from developers around the world, multiplatform.
They are different views of software evolution, i think that both have their strengths, it is good that we still can choose between two APIs that come from very different backgrounds, but do very similar things.
Performance difference between Direct3D and OpenGL is near nil. The feature sets of the two do not map one to one, but they are close. The main pro for OpenGL is cross platform support.
I don't feel that OpenGL fits nearly as well into a pure OO environment as something like XNA does. That said, if you really care about cross-platform compatibility, it shouldn't matter what you backend to.
Design the business logic of your application to be independent from the rendering backend. You should be able to plug in an OpenGL rendering object then swap it out for an XNA renderer no problem. Not only does this increase your potential customer base (by enabling support for both), but makes your application's design far nicer.
Also a small note, DX shouldn't be used from .NET, as Managed DirectX has been deprecated; use XNA.
You may want to look at this: http://groups.google.com/group/microsoft.public.win32.programmer.directx.managed/browse_thread/thread/1fc097147796e15b
The Managed API isn't being supported now, so OpenGL may be your best bet, unless you want to go with XNA.
Depending on what other platforms you may want to support, such as mobile devices or XBox360 then that may help you decide which api to use.