Jump to content
  • Advertisement
Sign in to follow this  
crosstantine

OpenGL worth the try?

This topic is 2687 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm starting with the game development path, I've a very good background in programming (C++, Java, C#, etc etc), not an expert but I'm sure I could manage most of them pretty good, and I'm starting right now with SDL and I'm very happy with the results, but I stopped to watch if there's a serious game development using OpenGL and found that OpenGL is used mainly as "learning" library, and some maths work,

I consider myself an Open Source lover and always try to enforce the multiple platform support in my developments, but I'm finding that the people say: "if you want to create serious game development stick with DirectX and XNA (Same thing)", that means that the game development future for apple, linux or others (based on OpenGL) is extinct?

Is it worthless to learn OpenGL if you will end up with DirectX anyway?

What about Android and iOS that are OpenGL based, are they planning to move to DirectX in the future (don't think so, but it's pretty strange that OpenGL has no really big plans for the future)?

I'm aware that this topic is going to be one of those topics where some people pull in one way while others pull to the other side of the rope, but I dont want to put all the eggs on the same basket and waste time.

Thanks for your answers.

Share this post


Link to post
Share on other sites
Advertisement

I'm starting with the game development path, I've a very good background in programming (C++, Java, C#, etc etc), not an expert but I'm sure I could manage most of them pretty good, and I'm starting right now with SDL and I'm very happy with the results, but I stopped to watch if there's a serious game development using OpenGL and found that OpenGL is used mainly as "learning" library, and some maths work,

I consider myself an Open Source lover and always try to enforce the multiple platform support in my developments, but I'm finding that the people say: "if you want to create serious game development stick with DirectX and XNA (Same thing)", that means that the game development future for apple, linux or others (based on OpenGL) is extinct?

Is it worthless to learn OpenGL if you will end up with DirectX anyway?

What about Android and iOS that are OpenGL based, are they planning to move to DirectX in the future (don't think so, but it's pretty strange that OpenGL has no really big plans for the future)?

I'm aware that this topic is going to be one of those topics where some people pull in one way while others pull to the other side of the rope, but I dont want to put all the eggs on the same basket and waste time.

Thanks for your answers.


Woah woah woah! OpenGL is not a "learning" library. It's very full featured and you can make extremely high end graphics with it.

Further, DirectX is a proprietary set of libraries for Windows, so no, Apple and Google are not going to move to it. It would definitely be worth your time to learn it, I believe.

Edit: Also, DirectX and XNA are not the same thing. DirectX is a collection of multimedia libraries, one of which is Direct3D (which is what almost everyone refers to when they say DirectX). Direct3D is a low-level API that allows you to leverage GPU hardware for 3D rendering, generally providing you with a rendering pipeline and the ability to control it. XNA is a .NET library that is designed to provide a higher level API for game development. It provides functionality in addition to graphics rendering, and is designed to be used with managed code. The performance of XNA, while quite good, is unlikely to match the performance of DirectX + C++.

They differ quite a bit in design philosophy. One of the prime goals of XNA is to eliminate a lot of the boilerplate code that is involved in making games, while DirectX promises no such thing.

Share this post


Link to post
Share on other sites
Thanks for your fast reply PropheticEdge, I realized that OpenGL is not a learning library as it's very powerful and complex for a none skilled developer, but I labeled as "learning" because as far as I can see most of the people use it to do some experiments and small games, but when the people comes to the big games they changed to DirectX, I'm trying to wonder why is that, as far as I can read OpenGL is easier to learn than directx because it abstracts the hardware interaction and with DirectX you need to handle a lot of things that OpenGL does for you,

From my gamer experience I found that OpenGL is far slower than DirectX but I blame the dedication that developers tend to give to DirectX because it's the higher seller, and OpenGL is for some geeks that play on weird platforms like linux (I'm this kind of geek that's why I started with OpenGL).

Sorry I now realized that I expressed my point wrong, XNA and DirectX are not the same thing, but are propietary and not multiplatform also it's one of the Microsoft's tentacles.

PropheticEdge, if someone ask you to create a new game will you take DirectX or OpenGL for that? in either case why will you choose that one over the other, I know it could be a tricky and long answer but I'm trying to understand why, if OpenGL is that good and offers multiplarform, most of developers goes to a complicated-propietary API.

Share this post


Link to post
Share on other sites

Thanks for your fast reply PropheticEdge, I realized that OpenGL is not a learning library as it's very powerful and complex for a none skilled developer, but I labeled as "learning" because as far as I can see most of the people use it to do some experiments and small games, but when the people comes to the big games they changed to DirectX, I'm trying to wonder why is that, as far as I can read OpenGL is easier to learn than directx because it abstracts the hardware interaction and with DirectX you need to handle a lot of things that OpenGL does for you,

From my gamer experience I found that OpenGL is far slower than DirectX but I blame the dedication that developers tend to give to DirectX because it's the higher seller, and OpenGL is for some geeks that play on weird platforms like linux (I'm this kind of geek that's why I started with OpenGL).

Sorry I now realized that I expressed my point wrong, XNA and DirectX are not the same thing, but are propietary and not multiplatform also it's one of the Microsoft's tentacles.

PropheticEdge, if someone ask you to create a new game will you take DirectX or OpenGL for that? in either case why will you choose that one over the other, I know it could be a tricky and long answer but I'm trying to understand why, if OpenGL is that good and offers multiplarform, most of developers goes to a complicated-propietary API.


I would use DirectX simply because it's what I know better (I'm not great with DirectX to be honest, but I'm worse with OpenGL).

Honestly? I think the reason people use DirectX is because other people use DirectX. It's just really commonly known and used, so people learn it since it's the most common thing. Performance differences aren't really tied into the API itself, I don't believe, but the implementation of the graphics hardware itself and its drivers. Direct3D tends to have more robust driver support, but I think for all practical purposes you will not be hamstringed by using OpenGL and can do basically anything that DirectX can do.

It sounds to me like you want to use OpenGL, but are afraid to because you believe it will be useless. It won't be. Go ahead and learn it if you like the way the API works or want cross-platform support.

Still, I'd suggest you wait until someone else pipes up on the boards. I'm just one dude and really not the most qualified to answer these questions.

Share this post


Link to post
Share on other sites
According to Wolfire Games, DirectX has a lot of propaganda tied to it and that's why people think it's what you need for serious games. I don't know much about it myself, but i found their arguments to be persuasive and you can read them here: http://blog.wolfire....and-not-DirectX

id Software is probably most notable for their use of OpenGL and for being an "early pioneer in the Linux gaming market" according to their wiki article. At one point John Carmack wrote a lengthy article/rant about why he preferred OpenGL. Doom 3, a very serious game, is offered on Linux, presumably thanks to GL. Googling "Carmack directX" today brings up a bunch of articles on why he currently ("finally", according to them) prefers DirectX.

I would say OpenGL is worth learning because the API is really clean. In contrast, DX, or Windows code in general, feels bulky, abrasive, and uninspired. I won't defend that--it's just opinion. Knowing both DX and GL would probably be best so that one could be prepared for anything on any platform.

Share this post


Link to post
Share on other sites
Direct3D used to have much better support than OpenGL back in the day, so it was much easier to find good Direct3D drivers than good OpenGL drivers. That's why so many games used Direct3D. Now that situation is much better, though for some things OpenGL drivers are still rough. In any case, that's still mostly inertia these days.

Also, yes, Direct3D in DX9 and earlier was horrible in comparison to OpenGL in terms of ease of use (there were lots of things Direct3D didn't do that it should have done... context losses were the main reason several games wouldn't support alt+tab while in fullscreen actually). That got better though, so they're pretty much at the same level. I still like OpenGL more though =|

Also, if you plan to work outside Microsoft platforms, then Direct3D won't take you far... if at all, really. So as soon as you move onto a non-Microsoft platform you have to go with OpenGL or similar (e.g. OpenGL ES for mobile devices).

Share this post


Link to post
Share on other sites
Thanks for sharing your knowledge with me, basically that's what I thought, OpenGL worth the try and I will start with it, actually I'm using SDL which will bring a little bit of abstraction over OpenGL (and it will use the DirectX advantages in windows, or that's what I understood from some posts I read about SDL), that way I can start my developments faster and with less pain :D.

Eventually I will need to use OpenGL directly and start to try DirectX if I want to be a game deverloper that could manage to stay in business.

Share this post


Link to post
Share on other sites
SDL is definitely a good start, as many all of the OpenGL tutorials I've run across on the Internet use it.

If you prefer a C++ equivalent, SFML is also a good option. It doesn't have the vast install base of SDL, but it's entirely hardware-accelerated (like SDL 1.3 will be).

When you're ready to take on OpenGL directly and want something small and lightweight to set up your context, I suggest GLFW (plus BASS or OpenAL for sound). It offers similar functionality to GLUT or freeglut but gives you more control over your main loop. (GLUT and friends tend to implement the main loop themselves.)

Also, to answer the original question: I think OpenGL is a good way to learn graphics programming since there are many helpful tutorials out there. Earlier versions of OpenGL (1.x and 2.x) are very easy to learn since they take care of a lot of things for you, though you wouldn't want to make a commercial game with those. Once you're comfortable with the basics, you can move on to more advanced techniques and later versions of OpenGL (3.x and 4.x). Since later versions of OpenGL and Direct3D act as relatively thin layers over the low-level graphics subsystem, they tend to work in relatively similar ways so learning one will let you pick up the other fairly quickly. It can't hurt to know both. :)

Share this post


Link to post
Share on other sites
:o that really hit something important, didn't know that SDL is not hardware accelerated, I read that SDL 1.3 will use DirectX under the hood to get advantange of the hardware acceleration provided by DirectX but I thought they were talking about using the drivers provided to DirectX (which seems to be better than the OpenGL's) but did not realize that SDL 1.2 was not hardware accelerated, why is that? OpenGL is hardware accelerated too right?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!