When to learn openGL?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
treyrust
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 36
Joined: Thu Jul 21, 2011 4:32 pm
Current Project: Between projects
Favorite Gaming Platforms: PS1/2/3/P, NES, Wii, Genesis, Dreamcast, GBA, DS
Programming Language of Choice: C++

When to learn openGL?

Post by treyrust »

Sorry if this has been posted before (the famous line from shy posters) but I couldn't find it in the search.

There are plenty of books out there for learning openGL, plenty of guides etc, I'll probably just flip through a few of them until I find one I like but...

...My question is, when should I learn openGL? I'm working on the infamous pong clone on the path to learning game programming and am doing that in SDL, I'm just wondering how much experience should I have with SDL before I move on? Or is openGL so different it doesn't matter?

I'm going to attempt pac-man next... I feel like I can do it, I've gotten a pretty good handle on SDL now.

But, isn't learning GL involved with more advanced math? I love math don't get me wrong, I just want to know where I should be as far as algebra/calc before I even think about GL. Like, sure I could learn the function calls but would I be able to do anything other than hang myself if I don't know calculus?

I have an 'end' goal in mind, a game that I have wanted to make for a while... I designed it to try and make something simple for my first big project, but the more I learn about SDL the more i realize I should be using GL because I want to do some fancy effects that I could do in SDL, I just know it wouldn't work out...This is something that I want to do right and put on my resume so I don't want to slack on it.

And which version? Sure, 3 is the future but how is it now as far as support/stability/compatibility/amount of books/guides for it?

So, the questions are: 1) At what point should I learn GL 2) What should I know before I start and 3) Which version should I learn?
User avatar
BugInTheSYS
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 88
Joined: Mon Feb 07, 2011 4:16 pm
Current Project: Vintage Roads
Favorite Gaming Platforms: PC
Programming Language of Choice: C++, Delphi
Location: Pinneberg, Germany
Contact:

Re: When to learn openGL?

Post by BugInTheSYS »

1) SDL isn't that bad, for the time being you don't have to learn OpenGL if you don't want to.
2) Actually with OpenGL you will feel a bit left alone since it doesn't do all the keyboard/mouse/sound stuff for you. Therefore it is really helpful to know how to create a window in bare c++ with the API of your operating system, how to set it up so GL can render to it, and how to get input, etc.
3) The newer versions' capabilities are supersets of the previous versions of openGL, and as long as you stay with most of the functions there won't be anything that's not supportd by the version your driver supports, whether it's 2.1, 3, 4 (yes, GL 4 exists), doesn't matter really. If you want to find out whether a function you're using is available in a specific version of OpenGL, you can take a look at http://www.opengl.org/sdk/docs/ to see what version of GL this function is specified in.
You don't need too much more math than you need in SDL, I think. Vector algebra is still very helpful for collision detection, and the rest shouldn't be too mathematically demanding, at least not at the beginning.
Someday, everything will go to /dev/null. - Bug's prophecy 13:37
User avatar
superLED
Chaos Rift Junior
Chaos Rift Junior
Posts: 303
Joined: Sun Nov 21, 2010 10:56 am
Current Project: Engine
Favorite Gaming Platforms: N64
Programming Language of Choice: C++, PHP
Location: Norway

Re: When to learn openGL?

Post by superLED »

BugInTheSYS wrote:2) Actually with OpenGL you will feel a bit left alone since it doesn't do all the keyboard/mouse/sound stuff for you. Therefore it is really helpful to know how to create a window in bare c++ with the API of your operating system, how to set it up so GL can render to it, and how to get input, etc.
I think you forgot that you can use OpenGL alongside with SDL. You can use SDL for input, music, threads, timers, and use OpenGL for rendering.
Then you only have to learn how to get graphics on the screen, and the rest is exactly the same.

I would suggest you make some very simple games at least, and then try to move over to OpenGL. If you move over to OpenGL too quickcly, you'd have to learn both how to make a game, AND how to render stuff all over again.
Post Reply