[SDL] Newbie question.

Ajit Kamat groups.lists at gmail.com
Wed Jan 26 14:04:33 PST 2005

On Tue, 25 Jan 2005 11:41:21 -0800, Sam Lantinga <slouken at devolution.com> wrote:
> > Hi All,
> > I am trying to understand SDL. I have a small doubt.
> > How does SDL stack agains OpenGL and DirectFB. Is it something like this:
> > +-----------+         +------------+
> > |   OpenGL  |         |    SDL     |
> > +-----------+         +------------+
> > |  DirectFB |         | DirectFB   |
> > +-----------+         +------------+
> > |  FB Dev   |         |  FB Dev    |
> > +-----------+         +------------+
> Yep, that's exactly right, although I wasn't aware of an OpenGL on DirectFB
> implementation...
> See ya,
>         -Sam Lantinga, Software Engineer, Blizzard Entertainment

I was in confusion because within the SDL library code I saw DirectFB
is being used, but similarly I also saw that DirectFB uses SDL. Few
statements from DirectFB's README file are as follows:

*******************************DirectFB README******************************

Supported Operating Systems
   - GNU/Linux

   Using SDL (without acceleration support), DirectFB also supports
   the following operating systems:

      - FreeBSD (last tested: DirectFB 0.9.21 on FreeBSD 5.2)
      - NetBSD  (tested on NetBSD 1.6)
      - OpenBSD (tested on OpenBSD 3.2)
           (If you have problems, try ./configure --disable-mmx)
      - Mac OS X (tested on Mac OS X 10.3.5, only works with
                  major workarounds, see README.OSX and consider using the
                  native osx system)
   Please note that SDL support is experimental and incomplete. It is
   intended for developers to allow development of DirectFB applications
   in various environments.

   Native (non SDL) support for the following operating systems is in progress:


Build Requirements

   - Linux kernel 2.2.x or newer with working frame buffer device
     (check /proc/fb) for the fbdev system.
   - Optionally SDL (Simple Direct Media Layer) for the sdl system.


So I was just confused about who was using whom - SDL using DirectFB
or DirectFB is using SDL.

Elsewhere in this mailing list, to the same question, Clemens
Kirchgatterer replied as follows:

"it's not that simple. dfb, ogl, sdl a.s.o. can stack up in varius ways.
you can have at least the following (in linux):

sdl on top of dfb, dfb on top of sdl, sdl on top of X11, sdl on top of
ogl (with ogl backend patch), ogl on top of dfb.

so as usual it comes down to the "what are your goals" question."


My goals are:
1. Learn graphics/games programming :) (Hence was searching for a library).
2. Put graphics/games on handheld devices.
3. Port OpenGL ES to Linux phone(s) :)

Am I looking at the right libraries (SDL and DirectFB)?



More information about the SDL mailing list