egui icon indicating copy to clipboard operation
egui copied to clipboard

GDI and X11 "renderer"

Open valaphee opened this issue 6 months ago • 3 comments

Is your feature request related to a problem? Please describe. Currently egui has to do tessellation on its own even though Windows for example has GDI, which allows to draw simple shapes with various parameters and would remove a sizeable chunk of code from the binary. It would also allow to run faster on platforms, which don't have a 3D accelerator/GPU and only a 2D accelerator / video out, like in virtual machines or some servers.

The font rendering would also match that of the system, and would automatically do the sub pixel rendering, and font smoothing (if enabled).

The X11 protocol also has a similar shape rendering technique, which would also allow for client side rendering, when using X11 forwarding, which is way more responsive then software rendering on the server (which is most likely not available) and transmitting a full image.

Describe the solution you'd like Implementing gdi and x11 integration into eframe.

Describe alternatives you've considered The GDI software renderer for OpenGL, would also work, but I guess drawing shapes directly is faster then drawing primitives. (But I would have to compare) For X11 forwarding there is not really any alternative.

Additional context

valaphee avatar Dec 24 '23 21:12 valaphee