-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate raylib and others for ui #33301
Comments
@deanlee want to try to make a small demo in raylib of the onroad camera view? |
I tried writing a simple demo based on Raylib to display the road camera (without shaders and transforms, just to quickly get a feel for Raylib's basic features). Although it's possible to use Raylib within a Qt widget to render graphics, this actually increases complexity and maintenance difficulty. There's no good way to gradually transition to Raylib and remove the Qt dependency through multiple PRs. It looks like a complete rewrite would be necessary. |
Qt was a big improvement over the old APKs, and I expect this to be a similar improvement. Smaller dependency, simpler library, better docs, etc. I also expect it to help with #30294. I think we do have to find some way to do this incrementally; like you said, it's too much to do all at once. If you can't figure out a way to do it, I can start it. Want to put up a draft PR with the demo you wrote? |
I'll commit a draft after adding the shader, transformations, and other features to ensure it matches the CameraView's output. |
fyne is quite nice although it's written in golang which would be a bit of a hurdle, though it wouldn't be the first time the UI were separate from the py. |
PR #33326 provides a draft on using Raylib to display the road camera, with automatic scaling to fit the window while keeping the aspect ratio. |
First Step: Migrate Onroad Widgets to Raylib
After step 1, the Following Step 1, we can also remove the UIScene struct from uiState to streamline it, allowing uiState to hold only the most essential state information required by the entire application.
Tools: Misc.
The final directory structure might look like this:
Here's a rough draft, written from scratch (interface issues can be addressed later). Although there is a lot of temporary code and commented-out sections with no cleanup yet, approximately 600 lines of onroad code have already been reduced. |
openpilot's UI used to be written in https://github.com/memononen/nanovg, and in retrospect that it was nicer to work in than . Qt is nice for cabana, but it turns out to not add much value to the openpilot ui and adds a bunch of conceptual and dependency complexity.
Some options
We're looking for:
The onroad camera view is a good test for trying out these libraries.
The text was updated successfully, but these errors were encountered: