[C++] OpenGL or DirectX

Started by
8 comments, last by agm_ultimatex 15 years, 8 months ago
Hey everyone, So I have been using this book Visual Basic Game Programming for teens and it has been using DirectX to teach me how to make the game. Well, before I got this book, I programmed in C++ all the time, and want to start with either OpenGL or DirectX because I am a little tired of SDL. I haven't made any games with SDL, but I know it fairly well and I'm sure I could if I tried. Anyways, I'm going to Full Sail in about a year, and want to start getting ahead and learning, but I want to do either OpenGL or DirectX, either one, it doesn't matter. But my question is, what is easier to learn. When I started with OpenGL it was fairly easy with GLUT, but I want to hear some opinions, and I want to hear some opinions of Full Sail as well. Thanks in advanced!
Advertisement
Forum search
I've only worked with OpenGL, so I can't compare them (but that is the age-old question asked here, I believe I asked myself quite some time ago), but since you're already familiar with SLD, C++ and OpenGL could be a nice route.

Regarding GLUT, I've just posted a reply in another thread recomending GLFW at SourceForge- and some of the reasoning behind it.

My post.

Regarding Full Sail - I have no idea.



Best of luck!
Student at NITH, Norway2nd year of Gameprogramming BachelordegreeC++ enthusiast
Quote:Original post by WanMaster
Quote:Original post by CodeLuggage
My post.

You forgot the '=' [smile]


Thank you!

I've been editing both posts as I haven't used HTML much before, and I made every possible mistake at every single link. One slipped past me. ;)
Student at NITH, Norway2nd year of Gameprogramming BachelordegreeC++ enthusiast
^^ Heh, I just noticed you fixed it and deleted my post. :)
If you don't know either, at all, I would advise going with DirectX [or more specifically, Direct3D, since that is the part of DirectX that is directly comparable to openGL].

For a beginner, it is pretty easy to get into the habit of writing very bad code in openGL. The reason for this is that most any tutorial you go with will start you off using functions and features, like 'glVertex3f()' [among many others], that perform a task 'easy', that also comes with a huge performance penalty. Once you start doing things for real, you end up having to unlearn what you saw in a lot of beginning tutorials and change your mindset, and lots of newbies hold on to these functions either out of ignorance or refusal to leave those easy and comfortable functions. DirectX doesn't include these functions. This makes for a slightly steeper learning curve at the very start, and slightly longer time until your first test projects get done, in exchange for learning it 'right' right from the start.

If you know anything about either of them, then stick with the one you already know something about.

[Edited by - Drigovas on August 1, 2008 6:08:43 AM]
OpenGL is easier in my opinion although very easy to write bad code in.
It might not seem this way at first, but ultimately the 3D API you use really isn't that important. With either one you'll be using the same core concepts, and those core concepts are what you really need to know. In the end the API is just a set of functions/routines you use to tell the hardware what to do.

That said...if I had to pick one I would pick a flavor of Direct3D. For these reasons:

-The SDK comes with excellent documentation
-The SDK comes with a slew of samples
-The present and future of the API is very clear (D3D10 is out already, D3D11 is spec'ed out)
-Comes with a very handy support library (D3DX), saving you from having to implement annoying things like texture loading yourself or finding a bunch of libraries to do it yourself
-Strong community support and knowledge compared to OpenGL (in my experience, so take this with a grain of salt)
-There's the option to use or switch over to XNA, which can let you develop for the Xbox 360 and sell a game on the Community Games service.
Alright, well I suppose I'll be going into DirectX, because now that I think about it, if I went to Full Sail, they teach DirectX I believe, so I might as well get a head start instead of referring back to my old functions I used in OpenGL. Thank's everyone!
IM in the middle of this question myself, and im trying not to ask here as it tends to start a debate. I read an article that talked about the headers of both, pros and cons. It seems like its a good idea to learn both really at one point or another. When you learn one, its not too difficult to learn the other as you have a lot of the logic.

This topic is closed to new replies.

Advertisement