Writing GUI applications on the Raspberry Pi without a desktop environment
This article explains writing GUI applications on a Raspberry Pi without a desktop environment. It covers interacting with the framebuffer, configuring resolutions, using low-level interfaces, Raylib library, and optimizing CPU usage.
Read original articleThis article discusses the process of writing GUI applications on a Raspberry Pi without a desktop environment. It explains how to interact with the framebuffer directly to display graphics on the screen. The author shares insights on setting up framebuffers, configuring resolutions, and displaying graphics using low-level interfaces like C programming. Additionally, the article introduces raspi2fb for mirroring the display from one framebuffer to another and suggests using the Raylib library for high-level graphics rendering. It provides guidance on building Raylib on the Raspberry Pi and optimizing CPU usage by implementing a "sleep"-based waiting mechanism. The article concludes with instructions on using Raylib in custom applications and modifying the Makefile for platform-specific options. Overall, it offers a comprehensive overview of developing GUI applications on a Raspberry Pi without relying on a traditional desktop environment.
Related
Eight million pixels and counting: improving texture atlas allocation in Firefox (2021)
Improving texture atlas allocation in WebRender with the guillotiere crate reduces texture memory usage. The guillotine algorithm was replaced due to fragmentation issues, leading to a more efficient allocator. Visualizing the atlas in SVG aids debugging. Rust's simplicity and Cargo fuzz testing are praised for code development and robustness. Enhancements in draw call batching and texture upload aim to boost performance on low-end Intel GPUs by optimizing texture atlases.
Remote shell to a Raspberry Pi at 39,000 ft
The author shares their positive experience beta testing remote shell on Raspberry Pi Connect during a flight, praising its stability and efficiency for text commands. They highlight its advantages over VNC in low-bandwidth situations.
Rp2040-psram: A header-only C library for access to SPI PSRAM via PIO on RP2040
The GitHub repository offers a header-only C library for RP2040 microcontroller to access SPI PSRAM via PIO, enhancing data transfer speed. Compatible with various PSRAM chips. Find details at https://github.com/polpo/rp2040-psram.
Running a Whoogle Instance on the Raspberry Pi Zero 2 W
The author shares their experience running Whoogle on a Raspberry Pi Zero 2 W, highlighting its versatility for projects. Whoogle offers ad-free Google search results, proving a rewarding and functional choice.
Writing GUI apps for Windows is painful
Samuel Tulach discusses challenges in writing Windows GUI apps in C++, emphasizing requirements like Windows support, styling, and efficiency. He evaluates various frameworks, recommending Dear ImGui for its simplicity and lightweight design.
Right now, the best of breed thought that I have is to run Weston, have a Qt application that is full screen, and to use DMA buffers so I can do some zero copy processing. Rockchip has their own MPP and RGA libraries that are tied into the Mali GPU, and I'm not smart enough to understand the current level of driver/userspace support to not leverage these libraries.
Rockchip and the ARM ecosystem is such a mess.
If anyone has any pointers, experience, approaches, code, etc, I would love to see it.
QML is nice, animations were much smoother than I expected.
http://tekui.neoscientists.org/
Only caveats: it's quite old and doesn't seem maintained anymore, although it still compiles fine, and it's Lua only, but being written in C it shouldn't be too hard to port it to other languages.
yeso is a very small and simple library, so you have to do more things from scratch than with libraries with more comprehensive functionality, but being able to test your app in a window before running it on the framebuffer could be useful
yeso's input handling on the linux framebuffer is not as complete as its x-windows handling, but it's good enough that yeso programs like ./tetris-fb (with wasd) and ./mand.lua do work on the framebuffer console. the terminal emulator admu-shell-fb mostly works, but it has the problem that things like control-z or control-c suspend or kill the terminal emulator instead of what you're running in it :)
(i haven't actually tried yeso on the pi, but if it doesn't work there i'll fix it)
It supports Vulkan, OpenGL, Cairo and other technologies.
Having slimmed down the RPi Lite OS as much as I can, running Wayfire with a Chromium kiosk is just too much for the Pi 3B+ I'm using once I add a streaming camera to the dashboard, and it can't cope. My goal is to have a responsive touch-screen display for Home Assistant using something in the form-factor of a Pi Zero 2W, so that I can put the SBC _inside_ the display and build a wooden picture frame to house it all, so it doesn't stick out like a sore thumb.
I'm not sure what kind of API HA has for the frontend, but my first thought, was to build a native application with a Go backend (I write Go for my day job) and use something like Wails[0] for the frontend and completely cut out the heavy-weight Chromium browser.
I have Pi4's and Pi5's but I really want to use the littlest amount of compute (and power) I can to achieve this, even it means writing the UI myself. I've tried looking for a lighter-weight browser that I can simply run the HA dashboard in to no avail.
Related
Eight million pixels and counting: improving texture atlas allocation in Firefox (2021)
Improving texture atlas allocation in WebRender with the guillotiere crate reduces texture memory usage. The guillotine algorithm was replaced due to fragmentation issues, leading to a more efficient allocator. Visualizing the atlas in SVG aids debugging. Rust's simplicity and Cargo fuzz testing are praised for code development and robustness. Enhancements in draw call batching and texture upload aim to boost performance on low-end Intel GPUs by optimizing texture atlases.
Remote shell to a Raspberry Pi at 39,000 ft
The author shares their positive experience beta testing remote shell on Raspberry Pi Connect during a flight, praising its stability and efficiency for text commands. They highlight its advantages over VNC in low-bandwidth situations.
Rp2040-psram: A header-only C library for access to SPI PSRAM via PIO on RP2040
The GitHub repository offers a header-only C library for RP2040 microcontroller to access SPI PSRAM via PIO, enhancing data transfer speed. Compatible with various PSRAM chips. Find details at https://github.com/polpo/rp2040-psram.
Running a Whoogle Instance on the Raspberry Pi Zero 2 W
The author shares their experience running Whoogle on a Raspberry Pi Zero 2 W, highlighting its versatility for projects. Whoogle offers ad-free Google search results, proving a rewarding and functional choice.
Writing GUI apps for Windows is painful
Samuel Tulach discusses challenges in writing Windows GUI apps in C++, emphasizing requirements like Windows support, styling, and efficiency. He evaluates various frameworks, recommending Dear ImGui for its simplicity and lightweight design.