GDI+ vs. SDL

Started by
5 comments, last by evillive2 18 years, 6 months ago
As the topics say.. what is the diffrents, what are the strenghts and weakness?. I have benn working with GDI+ a while, and don't know much about SDL
Advertisement
The main difference is that GDI is a graphics API wheras SDL handles graphics, input, sound, threading and other stuff.

The graphical part of SDL has many benefits over GDI:

  • SDL is cross-platform

  • SDL is much easier to work with

  • SDL has at least the possibility of hardware acceleration

Quote:Original post by Simian Man
The main difference is that GDI is a graphics API wheras SDL handles graphics, input, sound, threading and other stuff.

Perhaps you should answer the question? He asked about GDI+ vs SDL, not GDI vs SDL.
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Detailed and thorough comparison:

  • GDI+ draws primitives. Never heard of it beeing HW accelerated which means it will be pretty slow.

  • SDL handles HW and SW surfaces and gives you direct access to them. No primitive drawing supported unless you use additional libraries.

The SDL license sucks.
Quote:Original post by Tynnhammar
The SDL license sucks.


What's wrong with linking dynamically?
The portion of SDL that deals with graphics and GDI+ actually do many of the same things. The largest difference is that GDI+ is part of the Windows familly of API's and is restricted to PC's running a form of Microsoft Windows whereas SDL can be used on many different platforms such as linux and mac.

GDI+ is great as a graphics backend for simple windows games that use windows dialogs, menus and controls like solitaire or mine sweeper. It has no access to your graphics hardware so it doesn't care what kind of video card you have.

SDL offers a slightly different approach. It helps you create a window and get images on the screen quickly and with less code than GDI+ or DirectX. It does not however natively provide the ability to draw primitives such as lines or circles or even perform simple pixel manipulation. Instead it gives you the interface to do these things yourself or use any of the many add-on libraries to provide the functionality you want.

All in all you will eventually move onto using Direct3d or OpenGL for graphics. If you decide to go with OpenGL you will find SDL is a great tool as a window framework as opposed to using Win32.

Check out SDL's website for more information on what it is actually meant to be used for.
Evillive2

This topic is closed to new replies.

Advertisement