OpenGL....Direct3D?

Started by
26 comments, last by HebrewHammer 18 years, 9 months ago
I've just started getting inot to game programming and I'm current;y learning C++ and then Plan to learn DirectX (I plan on programming Multiplayer FPS, i.e. CS). Then I saw a book on OpenGL. What are the differences between OpenGL and Direct3D? Any advantages? Thanx
Advertisement
8) The infamous "this" vs. "that" threads are considered flame bait. If you’re debating between OpenGL and DirectX or C vs. C++, please try to refrain from creating "which one should I choose" or "which one is better" threads. These threads usually turn into an argument and rarely lead to any kind of conclusion.
The best way to find out if something is right for you, is to try it for yourself or at the very least, spend some time researching the pros and cons.

Forum FAQ.

'Tis not an issue we speak of. Differences are on google. OpenGL is in C, Direct3D is in C++.

The difference is more or less negligible. Choose one, learn it. If you don't like it, concepts of one will help you to learn the other.
Things change.
Sorry, how i worded it was really not the way i meant it. I was wondering if they did the same thing? Like, i know that Direct3D is for Graphics and is used in alot of games. I just dont know alot about OpenGL. But since you said the OpenGL is in C, it is not an option for me, seeing how i have to use c++. Thanx
C++ is built on top of C; OpenGL is very much an option.

Direct3D and OpenGL are both APIs for 3D Graphics. Their usage and syntax are slightly different, but descriptive names and widely-available documentation make them very readable and easy to learn.

But do what you want.
Things change.
You can use C++ in OpenGL. You can use other languages as well. OpenGL is cross platfrom while DirectX is Windows only. OpenGL is graphics only, but you can use SDL and other things to read from the keyboard, etc.
They are used for the same thing. Though "DirectX" includes other libraries for doing things like sound and input. OpenGL is just graphics.

You should also note that you can almost always use C code with C++, since C is (for the most part) a subset of C++. In fact, I bet someone out there has already written a C++ interface for OpenGL.
Very helpful, thanx alot!!!
I would say go with OpenGL. OpenGL has an ARB (Architecture Review Board) with 9 different companies involved. DirectX is just Microsoft. This would mean that OpenGL has more input into how we can improve it for the future. OpenGL is also slightly faster than DirectX.
"Hard work pays off for the future; laziness pays off now"
It all depends on what you want to do. If you are writing a cross-platform game, you will have to use OpenGL. If your game is Windows-only and you want to use audio, networking, joystick,... you could choose DirectX as it is an api that has functions for all these things.

My opinion is that OpenGL is more simple for a beginner.
Quote:OpenGL is also slightly faster than DirectX.
sorry, but i don't agree with that. neither one is automatically faster. it depends very much on the card and the driver. for instance, nvidias implementation of opengl is faster than ati's.

This topic is closed to new replies.

Advertisement