Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get SDL to use fbcon not caca

I am trying to get started using SDL to create a portable and pretty front end that can run under X, or directly from the terminal (hopefully on a rasberry pi at some point) - at the moment I'm on a laptop with the latest Ubuntu on it.

I am having trouble getting an image displayed properly on the terminal - it comes out as ascii art. I think this is a problem with my system configuration rather than the example program I have, as it works fine when run under X.

So far all I think I know is that SDL should be using the fbcon video driver, but is instead using aalib. I gather that SDL checks to see if framebuffer is available and uses it if it is - and it is there - at least according to the output of

> fbset -i  

mode "1024x768"
    geometry 1024 768 1024 768 32
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
endmode
like image 653
Handy Yates Avatar asked Jan 30 '13 23:01

Handy Yates


1 Answers

Make sure that your SDL install is built with framebuffer support (--enable-video-fbcon and/or --enable-video-directfb) and that the SDL_VIDEODRIVER environment variable is set to fbcon or directfb.

like image 66
genpfault Avatar answered Sep 20 '22 13:09

genpfault