• Advertisement
Sign in to follow this  

OpenGL or SDL?

This topic is 4916 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

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.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
< 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

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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 :/

Share this post


Link to post
Share on other sites
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>

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Quote:
Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power."

Simple DirectMedia Layer supports Linux, Windows, BeOS, MacOS Classic, MacOS X, FreeBSD, OpenBSD, BSD/OS, Solaris, IRIX, and QNX. There is also code, but no official support, for Windows CE, AmigaOS, Dreamcast, Atari, NetBSD, AIX, OSF/Tru64, RISC OS, and SymbianOS.

SDL is written in C, but works with C++ natively, and has bindings to several other languages, including Ada, Eiffel, Java, Lua, ML, Perl, PHP, Pike, Python, and Ruby.


This is from the SDL webpage. Should give you a good idea what SDL is. Hope that helps.

Grellin
Global Developers Union

Share this post


Link to post
Share on other sites
I already saw this, I checked the site alot and also downloaded the development stuff and I compiler some SDL test programs with graphics etc. and it compiles and runs so it works, I can start learning it and use it lol.

Btw, DaemonMagus, SDL is simple to learn and use, so it's ore easey to make a window in SDL than in OpenGL and thats the reason you can better make windows in SDL that in OpenGL.
And I asked the same as you did: Can you use one of the library's indepentdantly to make good programs or do you realy need both of them? I dunno how poerfull SDL is...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
SDL is a 2D library, OpenGL is a 3D library. Simple as that.

Share this post


Link to post
Share on other sites
Yes.. so I'm able to make 2D programsjust with SDL, no need for OpenGL :/

I will first learn SDL and than OpenGL. SDL looks fun lol :P
Finaly I can use grapics in my programs :)

Share this post


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

  • Advertisement