Jump to content
  • Advertisement
Sign in to follow this  
Frisker

GDI+ vs. SDL

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

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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!