Sign in to follow this  
Toadhead

OpenGL or SDL?

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
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
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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this