[SDL] SDL Without X Windows System

Stephane Marchesin stephane.marchesin at wanadoo.fr
Tue Sep 13 13:38:49 PDT 2005


Patrice Mandin wrote:
> Le Tue, 6 Sep 2005 15:56:13 -0500
> Felix Haquejiel <haquejiel at gmail.com> a écrit:
> 
> 
>>I've just been getting into Linux programming (in general) and SDL. I 
>>really, really like SDL, but I'm not especially fond of the X Windows 
>>System. Is there any way to use SDL without it? To get the OpenGL
>>rendering  contexts, the input, the audio, etc, or is everything that
>>SDL uses based  heavily around X? It's not that I mind the very small
>>overhead X can  provide, it's more that I just really don't like the
>>way it deals with  things.
> 
> 
> You can have OpenGL support without X (at least under Linux):
> 
> - either use OSMesa which is software rendering only. It could be easy
> to add this to the framebuffer SDL driver. Mesa has support for svgalib,
> but I don't know how it could integrate the svgalib SDL driver. We could
> add osmesa support for all targets as a default OpenGL driver.
> 
> - or add directfbgl support to the directfb SDL driver (this is a glx
> emulation layer), there is hardware accelerated drivers for just a few
> video cards:
> http://www.directfb.org/index.php?path=Development%2FProjects%2FDirectFBGL
> 

There's a third solution :

- implement OpenGL in the fbcon backend, using Mesa's miniglx (OpenGL 
over the framebuffer). This is limited to DRI-supported video cards but 
works fine and is hardware-accelerated. Actually, I had some code to do 
that somewhere and it even worked somehow, but I can't seem to find it 
any more :(

Stephane





More information about the SDL mailing list