Coder Social home page Coder Social logo

msylvia / spct-tt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from null-dev/tt

0.0 0.0 0.0 9.41 MB

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

Shell 0.31% JavaScript 2.32% Python 0.03% C 0.01% Objective-C 0.01% Rust 96.59% Makefile 0.02% HTML 0.41% GLSL 0.32%

spct-tt's Introduction

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
  • buildroot.sh 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

spct-tt's People

Contributors

null-dev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.