egui port to Car Thing (and maybe an alternative Car Thing UI?)

Related tags

GUI tt


This project contains a port of egui to the Spotify Car Thing although in the future I also plan for it to contain a custom Car Thing UI.

Technical information

  • Display/Touchscreen:
    • It's actually a portrait touchscreen
      • Seems like no way to rotate in hardware:
        • /sys/class/graphics/fb0/rotate doesn't seem to work
        • /sys/class/graphics/fb0/osd_reverse only flips/mirrors it (so it doesn't help either)
    • echo 1 > /sys/class/graphics/fb0/osd_clear can be used to clear the display
  • A branch of winit with KMS/DRM is used:
    • The KMS/DRM portion of the branch is not actually being used because the Car Thing doesn't support KMS/DRM.
      • The Car Thing supports FBDev instead (but I don't actually use that either, I use EGL directly)
    • Instead, it is being used because it supports libinput.
    • Other changes:
      • needed to config a custom calibration matrix in libinput to rotate the touchscreen
      • libinput Touch::Frame event is ignored (in the original implementation it was mapped to TouchEnd which doesn't make sense, that's not what it means)
      • xkb_compose is disabled, it caused runtime errors and we don't need it on the Car Thing anyways cause it doesn't have a keyboard
  • I have forked egui:
    • egui_glow rendering backend is used
      • OpenGL shader had to be modified to rotate everything (cause the touchscreen is rotated)
      • Calls to glViewport and glScissor has to be modified to be rotated as well
      • Custom rendering is still broken, I'm not sure how to fix that as I don't think there is a way to tell OpenGL to rotate everything rendered by custom renderers.
        • Maybe have custom renderers render to an intermediate buffer and then rotate that when copying it to the output framebuffer?
  • I have forked glutin:
    • A modification of the Android backend is used because it is similar to the graphical config of the Car Thing
    • KMS/DRM support is NOT used because again, the Car Thing is more similar to Android in that respect
  • builds and deploys the program using my Car Thing buildroot
    • You will probably have to modify it so it uses the correct paths and adb
You might also like...
Render egui with skia!

Skia backend for egui This is a drawing backend for egui that uses skia-safe. Usage Have a look at the metal or cpu examples to get started. Run the e

a day-planner/calendar app based on egui
a day-planner/calendar app based on egui

Malakal Malakal is a day planner application. I crafted it because I was not able to find a comfortable calendar application for Linux. I myself have

A render-backend independant egui backend for sdl2

A Sdl2 + Egui Backend An egui backend for sdl2 unbound to any renderer-backend. You can include it like so: [dependencies] egui_sdl2_platform = "0.1.0

egui backend for D3D9.

egui-d3d9 egui backend for D3D9. Primarily intended for source games like CS:GO and GMod. It's not perfect by far, but it'll do. This is a rewrite of

A tool for creating egui Visuals (themes).

egui-visuals-utility A tool for creating egui Visuals (themes). The code is rather messy and might crash but it seems to work. To load the theme use s

Create dynamic grid-based layouts for egui

egui_grid Create dynamic grid layouts for egui. Grids are flexible, easy to create, with behavior similar to egui_extra's strip creation. They're comp

Provides event handling for egui in SDL2 window applications.

egui-sdl2-event Provides event handling for egui when SDL2 is used as the windowing system. This crate does not perform any rendering, but it can be c

egui integration for ash (Vulkan).
egui integration for ash (Vulkan).

egui-ash egui integration for ash (Vulkan). This crate natively supports the multi-viewports feature added since version 0.24 of egui. You can use gpu

A Vulkan renderer for egui using Ash.
A Vulkan renderer for egui using Ash.

egui-ash-renderer A Vulkan renderer for egui using Ash. This is meant to add support for egui in your existing Vulkan/ash applications. Not a full efr

Andy Bao
Bored software developer.
Andy Bao
A presentation about egui, implemented in egui

egui presentation A presentation about egui, implemented in egui. You can view the presentation at TODO Li

Emil Ernerfeldt 9 Aug 24, 2023
Example showing how to use tokio and egui together.

Example using tokio with egui This example uses reqwest to send an HTTP request to httpbin. The parsed response contains an increment value (as provid

Jay Oster 10 Dec 25, 2022
An interactive JSON tree visualiser for egui, with search and highlight functionality.

egui_json_tree An interactive JSON tree visualiser for egui, with search and highlight functionality. Usage use egui::{Color32}; use egui_json_tree::{

null 13 Sep 1, 2023
This project attempts to allow the creation of reusable egui-themes

egui stylist Note this project is considered to be experimental and -- while used in personal projects -- may have API breaking changes without warnin

Jacobsky 22 Dec 1, 2022
A simple GUI version of the pH calibration tool written in egui, based on the eframe template.

caliphui A simple GUI version of the pH calibration tool written in egui, based on the eframe template. Usage Native binaries are provided under relea

Peter Dunne 0 Dec 29, 2021
FLTK frontend for Egui WGPU backend.

Egui FLTK Frontend FLTK Frontend for Egui WGPU Backend On linux Debian/Ubuntu, make sure to install the latest main requirements: sudo apt-get update

Adia Robbie 5 Oct 25, 2022
egui: an easy-to-use immediate mode GUI in pure Rust

?? egui: an easy-to-use GUI in pure Rust egui is a simple, fast, and highly portable immediate mode GUI library for Rust. egui runs on the web, native

Emil Ernerfeldt 12.6k Jan 3, 2023
D3D11 backend for egui library. Presumably for mods/cheats development

D3D11 backend for egui library. Presumably for mods/cheats development. Currently few features from egui are missing. WIP.

sy1ntexx 24 Jan 4, 2023
Egui bindings for macroquad

egui bindings for macroquad This is the easiest way to use egui. Just two functions! Web demo. Usage You need to call ui when you need to get informat

ilya sheprut 54 Dec 28, 2022
Egui bindings for miniquad

egui bindings for miniquad native On Linux you first must run apt install libx11-dev libxi-dev libgl1-mesa-dev (miniquad dependencies). cargo run --re

Fedor Logachev 48 Dec 28, 2022