Posts: 8
Joined: Thu Apr 03, 2014 1:30 pm

Graphics library for framebuffer writting

Tue Nov 15, 2016 12:58 pm

I am using ILI9341 based LCD display in one of my projects, utilizing Raspberry Pi Zero.
I was able to install it under system. Display is visible as /dev/fb1.
Now I am looking for some simple C library, which allow me to do some basic graphic operations (printing text, drawing lines and circles, displaying simple bitmaps). Simple menu system would also be nice. Basically - I am looking for something similar to popular Arduino graphic libraries, but designed to use /dev/fb1 as low level IO device.

Posts: 36
Joined: Tue Jan 10, 2012 11:16 am
Contact: Website

Re: Graphics library for framebuffer writting

Mon Nov 21, 2016 7:29 pm

I have been on the same journey. The excellent series by -rst- gives a good overview of writing directly to the framebuffer, and covers displaying lines, squares, circles, images and simple bitmap text: ... _9509.html

The problem is that /fb1 on the Raspberry Pi doesn't benefit from hardware graphics acceleration, and most of the Graphics libraries around won't work without modification. So what I decided to do is use raylib ( which is a really simple and easy to use Graphics library and write to /fb0 then use raspi2fb to mirror this to /fb1 that way you get the benefit of graphics acceleration writing to /fb0 and can display the results on /fb1

It's not exactly the solution you want but, strangely, I found I got better performance this way than trying to write directly to /fb1


Return to “Graphics programming”