What I've gathered around the internet and various sources is that DirectX has pretty much taken a stronghold grip onto the graphics API domain. And to be honest, I gave learning DirectX10 a chance, but I just cannot stand how things are initialized; it made it very difficult to really learn the actual 3D portion.

OpenGL on the other hand makes much more sense from a "coding" perspective to me, but I'm not sure if I want to invest time into something that "isn't going to last". I don't keep up with the latest news, nor know much about the "war" that goes on between OpenGL and DirectX. With that being said, is OpenGL going away anytime soon? The thing I like about OpenGL is that there are many more resources available (whether through books/tutorials/samples) than for DirectX, so it's a lot easier to learn.

So is it still a good time to learn OpenGL, or is DirectX just the future? Now I know there are 100,000 topics talking about which is better but that's not what I'm asking. I'm just asking if OpenGL is gonna stick around.

If you want to target ANYTHING that isn't Windows, you need OpenGL. That includes Linux, Mac OS, iPhone, Android, and any other esoteric operating system I don't know. Anyway, this is basically saying 'Is openGL any good compared to DX', and so I voted to close as subjective.
–
The Communist DuckMay 10 '11 at 15:30

12 Answers
12

Now I know there are 100000 topics
talking about which is better but
thats not what I'm asking, I'm just
asking if OpenGL is gonna stick
around.

Yes.

Technology never just vanishes -- once it has reached some critical mass, it's there to stay for a long time even if it never gets actively developed much any longer. It will be a very long time before the statement "it is a waste of time to learn OpenGL" is true.

Although I find your motivation and reasoning somewhat suspect, there's nothing wrong with learning OpenGL and it will allow you to learn exactly as much about 3D graphics theory and programming as D3D would. Really, in fact, it might be worthwhile to use it as a learning medium even if it were useless as a practical platform because the fundamental concepts transfer between APIs, so as long as it helps you acquire those concepts it's a good choice.

Well it's just kind of a side project thing, terrain rendering is something that interests me alot. And doing it in OpenGL (from what i've seen) is ALOT easier to understand than doing it in DirectX
–
MercfhMay 10 '11 at 15:15

XNA is an API for DirectX, and is easier to understand (IMO) than working directly with OGL or DX. The concepts you learn in XNA will carry over to either OpenGL or DirectX later.
–
OlhovskyMay 10 '11 at 20:59

1

There's even an open source OpenGL port of XNA, MonoGame.
–
voithosAug 7 '12 at 2:03

It's funny how world changes. OpenGL was the poor cousin of DirectX for a long time. Then somebody managed to stick a GPU inside a phone and voila: OpenGL Golden Age.
–
sm4Jun 12 '13 at 6:22

Do you actually want to make something and find OpenGL more fun or productive? Then maybe you want to learn OpenGL.

Will learning OpenGL make it harder to learn DirectX later if you needed to or wanted to? I don't think so.

I don't think anyone can predict which one will stick around, I'd say use whatever is best for your purposes now, and you can always pick up the other later. I've only used DirectX, just because it suited my purposes, but if I found OpenGL was easier for me to use in my game, I would have used it.

If you like using it or accomplish something with it, it's not a waste.

Open GL is the basis for Web GL, and while Web GL is still in infancy, if/when it becomes wide spread, it will be a useful thing to know. So along with generally being more cross platform than DirectX (covered in other answers), it will eventually be one of the options for making a 3d web browser game.

So, to answer your question, assuming webGL becomes a standard, openGL will stick around for a good, long time.

Not quite useless. It is worth pointing out that Mac systems still only support OpenGL, and only up to OpenGL 2.1. This means that any game you see on Mac (including some source engine games such as Portal, Left 4 Dead, Left 4 Dead 2) has been written using OpenGL. Given that Valve was able to adapt the source engine to use OpenGL 2.1 and do some amazing things with it, you are probably pretty safe to start there.

Newer versions of OSX do support OpenGL 3.3. Unfortunately as Apple write their own drivers and specify capabilities based on the OSX version/hardware the OpenGL version on Macs can't be updated unless you update the entire OS (which is a paid update). That means older versions of OpenGL will probably have to be supported for years to come.
–
David C. BishopAug 6 '12 at 23:12

It's not likely that OpenGL will stop being an actively developed or targeted technology any time soon. Comparing platforms where each API is nativity available, D3D has primarily Xbox, Windows and Windows Phone 7. OpenGL will also work on Windows, in addition to Mac OS X and Linux. OpenGL ES is on Android and iOS.

If your just looking for skills to get a well paying job you will probably need to learn DX as most of the mainstream game developers are targeting Windows and/or Xbox. Although the rapidly expanding mobile games market is increasing the relevance of OpenGL ES knowledge.

This is more for a side fun project for me. I have a normal programming job (firmware/drivers) So this is kinda the opposite end of the spectrum.
–
MercfhMay 10 '11 at 15:44

2

Most mainstream game developers I know don't actually do any graphics programming. All the work is hidden behind graphics abstraction layers. Maybe a shader written here and there, but the majority of the work isn't graphics related.
–
Tetrad♦May 11 '11 at 14:31

Initialization code is a tiny, tiny fraction of all code that deals with a sub-system like this kind of renderer. You're throwing away the vastly superior object orientation and that kind of advantage offered by DirectX because you don't like the first two hundred lines. I don't want to sound like I'm trivializing your opinion here, but the reality is that compared to all the code you might write that deals with any rendering subsystem, not ot mention whatever other subsystems you need, initialization is a triviality.

The problem (for me) at least is......there seems to be alot less information/tutorials available for DX and the ones that exist just don't explain it well enough for me. And through all the initialization looking through source code makes it alot more difficult (to me) to understand actually whats going on.
–
MercfhMay 10 '11 at 16:59

Altho...now that you mention it, maybe DX9 would be easier to start with.
–
MercfhMay 10 '11 at 17:18

2

I wouldn't recommend starting with DX9. It's not as organized as DX 10 and it's only going to go away.
–
da code monkeyMay 10 '11 at 18:28

I'm sure that others already told you many of the various reasons you should learn OpenGL, and why it definitively will stick around, but here's another, game-changing reason: Valve recently began developing and supporting Linux. What does this mean? Well, it means that most developers are going to start using OpenGL.

Even now, OpenGL gets most of the features sooner, it is supported on many different platforms, and many agree that it is the future.

well, openGL by itself actually moves at a monumentally slow pace. and just because valve has their source engine on linux does not mean anything to the use of OpenGL.
–
CobaltHexAug 6 '12 at 21:40

well it's more of a matter of dealing with all the inconsistencies across drivers. i know that programming drivers for opengl is a massive pain in the ass and there are going to be bugs no matter what, but maybe less so if it gets more popular
–
dretaAug 6 '12 at 22:00

1

@CobaltHex, actually, it does mean a lot. When a huge company that practically dictates the direction of the video game industry chooses a platform and stands behind it firmly, I'm pretty sure others will follow.
–
jcoAug 6 '12 at 22:21

while im sure some will, look at steam on OSX
–
CobaltHexAug 11 '12 at 20:09

It's a very different situation. Based Gaben already said that they are disappointed with W8 and that they're basically switching platforms. In contrast to OSX, Linux is free, accessable on a wide variety of hardware and has a great developer community. Not to mention how Valve's games run much faster on OpenGL on Windows, and even faster on OGL on Linux.
–
jcoAug 12 '12 at 10:06

If you start with graphics programming the technology matters, but if you become familiar with it only concepts start to matter and they are the same on Direct3D or OpenGL. As programmable pipeline programming opposed to fixed function pipeline is becoming the standard, the part where you interact with the graphics API is small part of all the work.

The other thing is, OpenGL is really big on mobile phones. It is called OpenGL ES and it is on a lot of levels exactly the same as OpenGL 4.1/4.0/3.3/3.2.

you can be a good game programmer without touching OpenGL nor DX. All you have to learn is to use a good game engine properly like Unity. However, if you want to to go more low level and understand how game engine works you should learn OpenGL. you won't gain much out of it in terms of 'quality' so it will be for learning purposes.

so my advice is learn to use a game engine coz that probably what will u do in you career (pro or indie) and also learn a graphics library like OpenGL for learning purposes only. (or if you want to make or modify a game engine)

It seems you are at the "twiddling your thumb" stage and not in the "what should we use to code our next engine on" stage, I would suggest neither learning OpenGL nor learning Direct3D.

Find a higher-level library that makes things easy for you, and start doing rather than staring at the mountains of things that you think you need to learn first.

You need to be comfortable with higher level concepts such as vector math, texture mapping, etc. before you are productive in OpenGL. So, pick a library, such as Ogre3D, Unity, Panda3D, etc. that makes sense for your platform, and start creating things. Once you are doing and not staring, then you can see what's the next thing to learn that would make sense.

I bet OpenGL or Direct3D will pop up very late in that list of things to learn.

As should be obvious from today's news (GL4.3/ES3), OpenGL is not going away and is still very much worth investing in. If nothing else, if you wish to target Linux or Max OS you need OpenGL, and ES is completely dominant in the mobile domain.

All that aside, in the long term you should be giving serious consideration to learning both APIs, as knowledge of both will be better for your own personal development. The only real question is which to learn first, and as OpenGL is easier for you then that's the decision made.

With the precious little knowledge we have , and the infinite amount of information in the universe you are going to have to look at that question as simple and selfish as possible.

What do I have to gain from doing that?

You already set the landmark for yourself saying this: "but Im not sure if I want to invest time into something that "isn't going to last""

So the real question you wanted to ask was: "Which is going to last longer"

And why ask that?

To know which you can use more for work/income right?

I would not recommend setting either in stone based on clairvoyance, instead browse for factual information on the net, look what companies and trends are going to last or find those that actually know that. I myself wouldn't have the foggiest idea and I care not to find out, I would burn that bridge when I get there. If I need to learn something new I would say: "Hurray!" rather than "Oh no!"