Advertisement

Win32 vs. SDL

Started by January 29, 2005 07:03 PM
10 comments, last by intrest86 19 years, 7 months ago
I was just wondering, if I am pretty well versed in Win32 programming, can anyone give a good reason that I would want to learn SDL? From what i could gather from the official SDL website, it really doesn't seem to offer much more then I can already do with Win32...am I missing something? I'm all for learning new stuff, just not sure if SDL is something worth my time. thanks.
Quote: From www.libsdl.org
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's cross-platform, and it provides easy access to audio, video, and input devices. On a personal note, I also think that SDL is fairly elegant while Win32 is the ugliest, most contorted API I've ever seen.
Advertisement
Win32 also doesn't let you access the hardware to do things like creating a fullscreen application at any resolution, v-syncing and/or buffer flipping. Those are essential for making games.
SDL's add on libraries also making loading a variety of image formats and music formats very easy. The big point is that its cross-platform. Its much cleaner than Win32 in regards to window setup, but you're also limited to one window and none of the Win32 components. Personally, I stopped using Win32 when Windows.Forms came into popularity.
Meh, it's already all been said so I'll summarize for you.


SDL >>>>>> Lose32


[grin]

Hero of Allacrost - A free, open-source 2D RPG in development.
Latest release June, 2015 - GameDev annoucement

Well I can say that if you already well versed in Win32, which is quite an accompishment if I might add, then you would not have any use for SDL. You already have the pre-requisite skills to go into either DirectX or OpenGL via Win32 frameworks. Don't get me wrong, SDL has a lot to offer compared to Win32, but you (general population of GDNet'ers) cannot just compare Win32 to SDL - they are two entirely different things. Win32 is an entire API that you can use to do anything SDL can do and more. SDL can only do a few things that Win32 can do, but it does them a lot easier and faster.

SDL is a graphics library that is built on top of OS netural code to allow cross platformation (is that a word? [lol]). Since you already know a lot of the Win32 platform, why not keep on? I'd say take a look into using something like OpenGL or DirectX as your graphics layer instead. If you go SDL, you will end up using OpenGL anyways, so you might as well go straight to OpenGL. You can use something as GLUT, FreeGLUT, or GLFW as the framework. For your input you can use DirectInput or Win32. For sound you have DirectSound or Windows MM.

Just a few of my opinions. I can say though you should be able to pick up SDL quite easily and fast, so it's not like you will be wasting time per se - you;d actually be gaining more experience, but overall I can't see you gaining any 'non-game' orientated programming experience from choosing SDL.

- Drew
Advertisement
wyrzy,
SDL doesnt allow switching of vsync either...
If you already know Win32, is is going to prove a lot less limmiting than SDL.
HxRender | Cornerstone SDL TutorialsCurrently picking on: Hedos, Programmer One
Quote: Original post by Drew_Benton
SDL is a graphics library that is built on top of OS netural code to allow cross platformation (is that a word? [lol]). Since you already know a lot of the Win32 platform, why not keep on? I'd say take a look into using something like OpenGL or DirectX as your graphics layer instead. If you go SDL, you will end up using OpenGL anyways, so you might as well go straight to OpenGL. You can use something as GLUT, FreeGLUT, or GLFW as the framework. For your input you can use DirectInput or Win32. For sound you have DirectSound or Windows MM.

Again, keep in mind that SDL is platform independent. "For your input you can use DirectInput or Win32"—on Windows. "For sound you have DirectSound or Windows MM"—for Windows. Quite apart from its capabilities and simplicity, SDL lacks these platform limitations.
thanks all for the replies. Im not too worried about cross platform development right now, so I guess I'll stick with Win32 until i move up into DirectX. Thanks

This topic is closed to new replies.

Advertisement