OpenGL or DirectX?

Started by
22 comments, last by Kylotan 16 years, 10 months ago
"I want to start programming 3D-games"

Well up to a certain extent it doesn't matter if you get started from opengl or direct x for the simple reason that you will never program a game this way :)

Use a game engine, beleive me
The question is : An opengl or a direct.x based engine ?

Although opengl is multiplatform I would suggest a direct x engine
Graphic cards manufactures suppport more direct x than opengl, right or wrong it is a matter of fact

If you want to make graphic programming ( dont confuse game and graphic programming ) than I would prefer opengl , its architecture being more intuitive
Advertisement
I'd say opengl. I tried directx a while ago, and opengl is a lot easier.
I wont tell you if one's better than the other, but I learned OpenGL in 6 months, and DirectX was a bit harder to learn. However, I have been told that in the games industry DirectX is more widely used, and considered to be more powerful.

The PS3 uses OpenGL-ES, (ES is for Embedded Systems) whereas the XBox 360 uses (no surprises here) DirectX 10.

The truth of the matter is that niether is better, they're just different.

I was also told that OpenGL is on the up, and that more games companies are using it as time goes by, but I'm not so sure...

Good luck dude, and if you pick OGL, have a look at the NeHe tutorials on NeHe.Gamedev.net -they rock!
Quote:Original post by Delfi
Quote:Original post by jpetrie
Quote:
I would recommend OpenGL, if only because of ... it's open-source nature.

OpenGL is not open source. It's a standard, which is freely available, however to claim that OpenGL is open source implies that the source code to the implementation must be available. It's not.


Let me correct you:

- Mesa 3d - linux opengl implementation of opengl is opensource..
- SGI offers a opengl reference software implementation under opensource license as well.


By that logic, DirectX is also open source, thanks to the efforts of the Wine project. Only I think their implementation can actually use hardware some.
I have not read any of the responses yet, but going off of statistics and the fact that I'm an opengl user, I suggest Opengl.

Statistics:
Opengl: 134,766
Directx: 253,504

# of topics on gamedev.net forums. Obviously directx is less intuitive. (or maybe it's more popular, intriguing? who knows)
We should really sticky one of these threads describing the different
relationships between the two.
Yeah, a sticky would be good, but only with comparisons, arguments about open source (although valid) ahouldn't be included in a sticky.

And to that particular argument, i'd like to add that OpenGL, although not open source, has been embraced by the open source community to a further extent (i.e. there's more open source programs in OpenGL than DirectX)

I digress, however. Sticky it, but with more emphasis on the comparison and technical comparison :)
Quote:Original post by TheUmpteenth
I wont tell you if one's better than the other, but I learned OpenGL in 6 months, and DirectX was a bit harder to learn. However, I have been told that in the games industry DirectX is more widely used, and considered to be more powerful.

The PS3 uses OpenGL-ES, (ES is for Embedded Systems) whereas the XBox 360 uses (no surprises here) DirectX 10.

The truth of the matter is that niether is better, they're just different.

I was also told that OpenGL is on the up, and that more games companies are using it as time goes by, but I'm not so sure...

Good luck dude, and if you pick OGL, have a look at the NeHe tutorials on NeHe.Gamedev.net -they rock!


I believe the 360 uses a derivative/variation of D3D9. No D3D10 or DX10 for that matter.

Beginner in Game Development?  Read here. And read here.

 

I use OpenGL because:

1. It's portable: it works on Windows, Linux, Mac OS and Playstation, amongst many others.

2. It's forwards compatible: each version of DirectX introduced slight changes to the existing API: to use new features of the current version you have to fix your program so it works with the new one. OpenGL is designed so that even decades old OpenGL programs have the same behaviour on the latest hardware.

This doesn't just mean that you can upgrade your graphics without having to port the entire thing to a new version: if your game allows mods to access OpenGL extensions, then mods can use OpenGL features which didn't exist when you wrote the game.

3. I find its design aesthetically pleasing.

I think (1) and (2) are genuine advantages. Of course, (1) only applies if you care about writing portable code, and (2) only applies if you care about making your game moddable.
Hiya, just wanted to clarify something, and then suggest a book!

First, the OpenGL-ES that PS3 uses...erm, it's more like 'SonyGL', given that they had to hack it up so they could have a nice programmable pipeline. This will probably mean nothing to OP, but is a useful distinction I think -- but has similarities in many respects to vanilla OGL.

Meanwhile, before tackling choice of which API is pre-eminent (neither, both have uses/platforms they work on better), might want to think about pre-requisites. That is, do you know the stuff that most graphics texts expect you to know before you start? First is math, Linear Algebra, maybe some differential equation stuff. I found:

3D Math Primer for graphics and game development, by Dunn & Parberry to be an excellent resource. I already -knew- the math, but this book is a great 'ready reference', in case you forget just exactly how to do something -- plus also great for people who know -no- math...takes easy steps :)

The other thing is a programming language. C++ is pretty darn common around here, though you can use others. I'm not going to recommend one over another, but bear in mind that if you wanted a job doing this later, C++ is industry standard right now (this could change!).

Anyway, food for thought.

~Shiny
------------'C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, it blows away your whole leg.' -Bjarne Stroustrup

This topic is closed to new replies.

Advertisement