Warning
This post was published 44 days ago. The information described in this article may have changed.
Hi !
SDL2 Canvas is the default renderer of the SDL (it's known as SDL_Renderer in C), and I like it because it's really simple. I learned about egui in the past weeks and I didn't find any egui -> canvas backend.
Thanks to SDL2's API to render triangles, I wrote a little crate :
MatthieuHAMEL/egui_sdl2_canvas: egui working with the sdl2 canvas (built-in renderer), in Rust
It can be used with egui_sdl2_platform for anything else that's not painting-related (like event handling). There are some examples in the repo.
Of course, the canvas renderer is simpler but it's also more limited than SDL2 OpenGL renderer for example. For now what I tried to display was fine but I'm curious about the "hard limitations"... (that is, what is the subset of egui I will not be able to render properly with that crate).
Feedback is greatly appreciated since this is my first crate! ...
Thanks in advance!
1 post - 1 participant
🏷️ rust_feed