User avatar
sdra
Posts: 9
Joined: Wed Jan 27, 2016 9:42 pm
Location: Amsterdam, NL

Minimal GUI without X

Wed Feb 24, 2016 11:07 am

Hi,

I've been looking for a while now and could not find a definitive answer. Almost all posts I've found are ~3-4 years old.

I need a very minimal interface (background image and few buttons on top) and don't want to depend on X. Also I'm building the system out of buildroot so dependencies might be limited. Target screen is the TFT 2.8" touchscreen.

So far I've been investigating SDL, DirectFB, linux framebuffer, ...
  • SDL 1 seems to fit, no hardware acceleration and other useful functionalities though.
  • SDL 2 seems to be depending on X.
  • DirectFB's website if down since june 2015 apparently, cannot find much documentation.
  • Linux framebuffer seems very low level, but could be a fit.
Could get some opinion about the above mentioned libraries or some direct experience comment?

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: Minimal GUI without X

Mon Feb 29, 2016 4:32 pm

SDL wiki seems in fact to suggest it requires X11 but I thought it should be able to run it without - some info on SDL2 on RPi viewtopic.php?p=544740
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Minimal GUI without X

Mon Feb 29, 2016 5:31 pm

sdra wrote:I need a very minimal interface (background image and few buttons on top) and don't want to depend on X. Also I'm building the system out of buildroot so dependencies might be limited. Target screen is the TFT 2.8" touchscreen.
The most minimum interface would be to create the display as a picture and then just write it to the framebuffer or other low level display system. I don't know what you doing but if you develop it so that the display part itself is separate from the creation of the display, you can do each on different systems. X supports this but at a higher level. Even if that's not important right now, of course you can do both on the same system, by having them separated, you could add capabilities later. It's not even hard to image a situation where you have made something and suddenly ask yourself why not have three of those displays displaying the same thing.

User avatar
[email protected]
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Minimal GUI without X

Mon Feb 29, 2016 6:32 pm

-rst- wrote:SDL wiki seems in fact to suggest it requires X11 but I thought it should be able to run it without - some info on SDL2 on RPi viewtopic.php?p=544740
SDL (1.3) definitely doesn't need X to run. I've been looking at 2 - but not had that much time to implement it in my BASIC.

However SDL 1 is fast enough for simple graphics, even moving blocks of screen about, plotting sprites, etc. All depends on the application, really.

-Gordon
--
Gordons projects: https://projects.drogon.net/

User avatar
sdra
Posts: 9
Joined: Wed Jan 27, 2016 9:42 pm
Location: Amsterdam, NL

Re: Minimal GUI without X

Fri Apr 22, 2016 11:24 am

This post is a nice round up for graphic options on the RPi:

viewtopic.php?p=152665#p152665

raysan5
Posts: 37
Joined: Tue Sep 30, 2014 4:44 pm
Location: Barcelona
Contact: Website

Re: Minimal GUI without X

Fri Apr 22, 2016 4:47 pm

You can try using my library: raylib (http://www.raylib.com).

It doesn't require X and it uses OpenGL ES 2.0 with EGL. It runs in any Pi version.

Library also comes with a bunch of examples (http://www.raylib.com/examples.htm) and some complete games (http://www.raylib.com/games.htm).

Dependencies on the RPI are kept to the minimum.

For more information on installation an usage: https://github.com/raysan5/raylib/wiki/ ... spberry-Pi

Any feedback is welcome! :)

Return to “C/C++”