Newbie question

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

Please help me in understanding the relation between SDL, OpenGL and DirectFB.

Thanks and regards,

~Ajit

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

Ajit Kamat <groups.lists at gmail.com> wrote:

Please help me in understanding the relation between SDL, OpenGL and
DirectFB.

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.

clemns

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 SystemsOn Tue, 25 Jan 2005 11:41:21 -0800, Sam Lantinga 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


  • 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 :slight_smile: (Hence was searching for a library).
  2. Put graphics/games on handheld devices.
  3. Port OpenGL ES to Linux phone(s) :slight_smile:

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

Cheers,

~Ajit

Ajit Kamat <groups.lists at gmail.com> wrote:

[…]

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 :slight_smile: (Hence was searching for a
    library).
  2. Put graphics/games on handheld devices.
  3. Port OpenGL ES to Linux phone(s) :slight_smile:

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

it seems, that SDL is the way to go for you. SDL is probably the most
portable (ported) multimedia API. even, if your are going to do opengl
things, sdl can be of great use, because it provides you with setting up
the render context, event handling and audio. the api is consistent and
easy to learn.

directfb is great for fullscreen linux applications, the api is not so
simple as sdl but much more powerful. (i.e. supports per surface AND per
pixel alpha at the same time, …). keep in mind that hardware
acceleration is only available for a limited number of gfx chips. i
tested it on unichrome, matrox and rage128 and i heard that nvidia
support is caching up.

best regards …
clemens