Open maxime-desroches opened 1 month ago
@deanlee Interested in working on this?
I'll give it a try. I'll start once the Qt dependency is removed from Replay.
$300 bounty for getting this PR running on device (performantly) https://github.com/commaai/openpilot/pull/33738
Hey is this still open I am interested in working on this I come from a gamedev background?
Yes, it's still open. You can lock it by opening a draft PR with some progress towards it.
Context
We want to switch from QT to raylib for the UI.
On device, we use Wayland with Weston 1.9 (from 2015) as the compositor.
Wayland defines a bunch of protocols to communicate with the compositor. The protocol we currently use is
wl_shell
. It has been deprecated since at least 2016 and was replaced withxdg_shell
. Our version of weston should supportxdg_shell
as shown when runningweston-info
on device.raylib uses GLFW for creating windows/surfaces and handling user inputs. GLFW deprecated
wl_shell
in version 3.3 in favor ofxdg_shell
.(On a side note, raylib disabled wayland support by default last week : https://github.com/raysan5/raylib/pull/4369 . See this issue for a very good overview of wayland support for raylib: https://github.com/raysan5/raylib/issues/4371)
The problem
GLFW does not work on device. Using pre 3.3 version of GLFW result in segfault when calling
glfwCreateWindow()
with the following backtrace:It is currently possible to create and open a window (and even do openGL rendering) manually using the
wl_shell
protocol with https://gist.github.com/Miouyouyou/ca15af1c7f2696f66b0e013058f110b4 and compiling it withgcc -o test init_window.c -I. -lwayland-client -lwayland-server -lwayland-egl -lEGL -lGLESv2
or even simpler without openGL https://gist.github.com/hoyon/e9f86c481528c2eeca22921bad90b60cTrying to manually create windows using
xdg_shell
also results in segfault:Goal
Make GLFW and raylib work on device