OpenGL or SDL?

Started by
12 comments, last by Toadhead 19 years, 7 months ago
Whats the best to learn first after I'm skilled with the ANSI/ISO C++? OpenGL or SDL? And could someone give me an overvieuw about what you can do with these library's? I mean ofcourse I know that you can use OpenGL for 3D graphics but not for sound and you can use SDL for sound, but I mean.. could I make good programs with just SDL 'or' OpenGL(with just one of those) ? Or do I need to learn them both first? Or does someone recommend other library's instead of OpenGL and SDL? Please help :P It will cost alot of time to learn them so I don't want to learn them for nothing, i first want to know wich one I need. Ow.. btw, how long will it take to learn one of those library's like OpenGL and SDL? Ofcourse I know that it will depend from human to human, but when you compare it with the ANSI/ISO C++, will it cost like 2 times more as that? 3 times? I learned the ANSI/ISO C++ in like 4-5-6 months, how long will it take for me to learn one of those librarys? I don't realy care, It's my hobby to program (and to learn it), but I just want to have an idea how much time I need to spend.
Advertisement
SDL first, but do OpenGL pretty much right away.

SDL is rather minor, use it to do the platform specific stuff, and then do your OpenGL drawing on top of SDL. There are numerous tutorials on how to set these things up. OpenGL isn't a small thing to learn entirely, but it's condusive to learning in baby steps. I'm not what you'd call proficient, but I've done entire games. It's a learning process.
yeah, thats what I thought lol.
I'm gonna learn SDL first and when I still like programming and still have time for it I might also learn OpenGL :P
OpenGl is where the fun stuff comes in tho.

drawing in SDL isnt awesome, so I just used it for making my window, and parsing my keyboard input. You just set these things up and more or less forget about them.

so out of the box my code should be cross platform just by doing that.

OpenGL has a pretty easy learning curve, so it doesnt really take any time at all to pick up the basics.
< snip >

SDL is awesome, but I'm thinking it's best purpose is as a quick and easy way to set up a window / sound / and input for an OpenGL game.

- Stephen
If all your using SDL for is windowing and input, don't forget alternitives like GLFW + FMOD, which will get you window, sound, input, timers...
SDL is more pupulair, I'm gonna learn that first. I think there more tutorials for SDL, however I don't think there any SDL books here in the Netherlands :/
Programming Linux Games

I know the title says programming for linux but the section in this book that covers SDL worked perfectly on Windows. I guess it would, cross platform and all. Anyway, I found it extremely useful. Hope you do as well.

Grellin
Global Developers Union
"If you are not willing to try, you will never succeed!"GrellinC++ Game Programming
SDL Rocks. I'd work with that for a while. It's really easy to work with, and there are some good sites for learning it too.
<see sig>
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
I'm kinda confused as to what SDL does. Is it a graphic library, or sound or input? Is it like DirectX? Would you need to use it in conjunction with OpenGL or could you use OpenGL or SDL independently? Why wouldn't you just set up the window with OpenGL?

This topic is closed to new replies.

Advertisement