Allow opting out of the dedicated GPU on macOS #1095
Labels
egui_glow
Relates to running egui_glow on native
feature
New feature or request
performance
Lower CPU/GPU usage (optimize)
Is your feature request related to a problem? Please describe.
There's an issue on Postsack about high battery consumption of the app when run on MacBook Pros that contain a dedicated GPU. Basically by default any
egui
app switches macOS to the more powerful dedicated GPU. In most cases, though, the internal GPU (of the Intel chipset) would be enough for rendering the app.Glium supports this via the
with_hardware_acceleration
call. However,egui_glium
currently doesn't expose this.Describe the solution you'd like
My proposal would be to add an additional
requires_dedicated_gpu
field toepi::NativeOptions
and then use that in theepi_backend
. The default value could betrue
but it would be nice to be able to opt out. The whole thing could also be limited to macOS viatarget_os = "macos"
. I'd be willing to implement this in a PR if this solution is approved.Describe alternatives you've considered
Not implementing it would make any egui app on most of the older MacBook Pros out there consume their battery faster (also, heat up and turn on the fans I guess).
Additional context
rust-windowing/glutin#980
The text was updated successfully, but these errors were encountered: