What to learn first OpenGL or DirectX

Jul 17, 2014 at 4:01pm
closed account (1v5E3TCk)
I know there are too many topics about it but they all asks what to learn. The matter is we should learn both to be a really good. Iwant to develop my games using DirectX for Windows and using OpenGL for other platforms.
My question is which would be better to learn first. So which one is easier to handle?
Jul 17, 2014 at 5:30pm
closed account (10X9216C)
You don't need to learn both to be "a really good". Opengl is available on every platform except xbox ("directxbox"). The trade off for only using OpenGL is that it simplifies your code, shaders, etc... Versus complicating your code, essentially writing two sets of shaders, just to support one extra platform.

An article you can read as well: http://blog.wolfire.com/2010/01/Why-you-should-use-OpenGL-and-not-DirectX

It doesn't really matter which one you learn first, if you are dead set on doing so. Knowledge of one transfers over to the other relatively easily, as they do everything pretty similarly. Don't learn APIs, learn the concepts behind them and you'll be set.
Last edited on Jul 17, 2014 at 5:31pm
Jul 17, 2014 at 6:19pm
closed account (1v5E3TCk)
There is a misunderstood about being good :D. But thanks for your help.
Why I want to learn both is I wont be a lone wolf whole my life. When I get into a group or company they will expect some skills from me. So it is always better to know new things and extra knowledge doesnt hurt right?
Jul 17, 2014 at 6:23pm
It's impossible to learn every API. Myesolar is right, learn the concepts. Master one, and then the other will come quickly if you ever need it.
Jul 17, 2014 at 6:54pm
closed account (1v5E3TCk)
Yes that is right but knowing both OpenGL and DirectX is an advantage because DirectX drivers are better on Windows. It would be really nice to set a flag to control which API to use so you can port your game to any platform from Windows easly, am I wrong?
Jul 17, 2014 at 7:04pm
closed account (10X9216C)
If you are joining a company, odds are you won't ever see the opengl/directx API or even touch it directly. They probably have their own API that wraps around it so that the underlining API doesn't matter.
Jul 17, 2014 at 7:04pm
It would be really nice to set a flag to control which API to use
You can do something like:
1
2
3
4
5
#ifdef __WINDOWS__
//use directx functions
#else
//use opengl
#endif 

http://sourceforge.net/p/predef/wiki/OperatingSystems/
Jul 17, 2014 at 7:07pm
Well of course knowing both is advantage. It's a huge advantage if you were proficient in every language, every platform, every SDK, API, framework, library, etc., but alas we are human and do not have infinite time.

It's much better to pick one and get decent at that. Make something out of it. Trying to learn them both at the same time will do nothing but hurt you. Once you are halfway proficient in one, go learn a little bit about the other if you have the need to.
Jul 17, 2014 at 7:32pm
closed account (1v5E3TCk)
Thanks everyone, I made up my mind. I am going to learn OpenGL. But one last question: Do you know any good tutorials or boks about OpenGL :D
Jul 17, 2014 at 7:37pm
There's what's called the Red Book, which is considered the best OpenGL resource.

http://www.amazon.com/dp/0321773039/
Jul 17, 2014 at 8:09pm
closed account (1v5E3TCk)
Thanks for your book recommendation.
Jul 17, 2014 at 9:10pm
closed account (10X9216C)
http://www.arcsynthesis.org/gltut/

As well is pretty good.
Jul 17, 2014 at 9:30pm
closed account (1v5E3TCk)
There is too many things in that link. Thanks myesolar.
Jul 17, 2014 at 9:34pm
closed account (10X9216C)
Just click the first one, read to the end, and then click next at the bottom.
Jul 17, 2014 at 9:43pm
closed account (1v5E3TCk)
Thanks for the tip. It is nice that there is a free resource.

Edit: Anyway which OpenGL version is that link for?
Last edited on Jul 17, 2014 at 9:45pm
Topic archived. No new replies allowed.