SDL and the framebuffer

An embedded and charset-unspecified text was scrubbed…
Name: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050126/92f467c4/attachment.txt

Is SDL capable of using the framebuffer?

Yep, and DirectFB as well. (And IIRC, GGI, which also supports fbdev -
but there’s no point in adding another layer, of course.)

I have played with SDL
under X11 in the past, however a new project has come up and I hope
SDL will be part of my solution.

I need to create a custom installer under linux and linux only.
The installer needs to be able to run under the framebuffer.

Unless you have a custom toolkit for SDL that you want to use, or have
other reasons to use SDL, you might be better off with some GUI
toolkit that runs on fbdev. (MiniGUI, GTK+, QT/Embedded etc…)

Currently we have a text installer that works pretty good, and my
hope is that we can create a GUI installer using SDL… if it
supports the framebuffer.

Bottomline: Does SDL support programming the framebuffer, and if so
how should one go about it? perhaps a “Hello World” type example
including any specefic gcc compile options neccesary.

I don’t think there’s a need for an example, since fbdev is just
another supported backend. There should be no difference to
applications using SDL. That’s pretty much the point with SDL. :slight_smile:

However, you’ll need to make sure your SDL lib has fbdev support
compiled in. Not sure if it requires anything more than the kernel
headers. (Which should be in place on any Linux system with devtools
installed, I think…)

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Wednesday 26 January 2005 12.35, Steve B wrote:

An embedded and charset-unspecified text was scrubbed…
Name: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050126/36087bcb/attachment.asc

— David Olofson <@David_Olofson> wrote:
[…]

Is SDL capable of using the framebuffer?

Yep, and DirectFB as well. (And IIRC, GGI, which also supports
fbdev - but there’s no point in adding another layer, of course.)

Ok, but how do I tell SDL what video backend to use?

When you initialize the display, SDL will try to use the "best"
backend it has compiled-in support for. You can override that
mechanism using the SDL_VIDEODRIVER system variable;

SDL_VIDEODRIVER=directfb ./your_application

or
export SDL_VIDEODRIVER=directfb
./your_application

[…]

I don’t think there’s a need for an example, since fbdev is just
another supported backend.

again… how do I specefiy what backend to use when compiling
individual applications…

You don’t. :slight_smile: (Unless the application can select backends
explicitly, and has a compile time option to require a specific
backend.)

there has to be a way to say compile this
app to run under X and this one to run under fb…

You don’t compile any actual SDL code when you compile SDL
applications, not ever when linking statically with SDL, so the only
way to affect the operation of SDL is through the application code,
when it’s executed.

or will an
application compiled under sdl just use the fb is X is not running?

Yep. Any application using SDL should run on any backend, or at least
backends that provide the required features, if there are any special
requirements. (A mouse or OpenGL may be required for the application
to be of any use, for example. Some applications may be "hardwired"
to specific backends as a result of bypassing SDL for certain
operations.)

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Wednesday 26 January 2005 13.24, Steve B wrote:

On Wednesday 26 January 2005 12.35, Steve B wrote: