rprata / sgfx

SGFX is a lightweight embedded library for displays and touchscreens providing everything required to build a fully featured embedded GUI.
MIT License
24 stars 8 forks source link
beaglebone-black c crossplatform dragonboard410c embedded-library embedded-systems framebuffer framebuffers graphic-library graphical-interface iot iot-framework lightweight-embedded-library linux linux-framebuffer lua lua-binding odroid-c2 raspberry-pi touchscreen

SGFX

CircleCI

What is SGFX?

SGFX is a lightweight embedded library for displays and touchscreens providing everything required to build a fully featured embedded GUI. The SGFX library has been designed to be the smallest, fastest and most advanced embedded library for display and touchscreen solutions. For more information, access the official website.

Goals of SGFX

Supported compilers

Supported architectures

Tested platforms

If you have a suggestion or want contribuite with a new portings, create an issue :wink:

Installation

SGFX requires CMake and Ninja to compile. Follow the instructions:

$ cd sgfx
$ mkdir build
$ cmake CMakeLists.txt -Bbuild -GNinja
$ cmake --build build

In case of cross compilation:

$ cd sgfx
$ mkdir build
$ cmake CMakeLists.txt -Bbuild -GNinja -DCMAKE_TOOLCHAIN_FILE=toolchains/<toolchain_file>.cmake
$ cmake --build build

Running examples

First, you must configure framebuffer filedescriptor used by target archtecture. Default value used is /dev/fb0, however you can change it creating a .sgfxconfig:

FDFB=/dev/fb

After that run examples (remember to run as a superuser):

cd build
./examples/<example>
Examples Definition
helloworld Hello World Example
drawprimitives Primitives (rect, line...)
drawimages PNG, BMP and TIF
drawtext Draw simple text
eventexample Touch event example

License

SGFX may be modified and distributed under the terms of the MIT license. See the LICENSE file for details.