emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
21.88k stars 1.58k forks source link

egui_glow will crash when use it from windows RDP #2573

Open lencil opened 1 year ago

lencil commented 1 year ago

seems that gl init failed in windows remote desktop. when use egui_wgpu,it works fine. But egui_wgpu refused to work in windows 7. Is it posible that egui will provide some fallback strateges if graphic system init failed?

emilk commented 1 year ago

Does https://github.com/emilk/egui/pull/2526 help?

lencil commented 1 year ago

Does #2526 help?

No, egui of glow only crashed in the machine with windows 10 created by vmware esxi which only has opengl 1.1.

coderedart commented 1 year ago

related to https://github.com/emilk/egui/issues/2545 from comment on that issue:

  1. it seems RDP requires some configuration to actually be able to use the host gpu. https://answers.microsoft.com/en-us/windows/forum/all/use-host-gpu-in-remote-desktop-session/34e1fd21-bf52-4f73-9907-3ce7359546d8
  2. another potential solution is a software renderer https://github.com/emilk/egui/issues/1129 . still a WIP.
  3. use a browser, which will take away all complexity of native opengl mess and provide us with a common webgl2 abstraction. eframe-template repo already provides trunk support to serve the files (and recompile them on changes).
rustytsuki commented 1 year ago

I write a demo of auto fallback to software mode by using skia backend. https://github.com/rustytsuki/egui_skia_auto_fallback_demo

WeirdConstructor commented 1 year ago

I wanted to leave a note here, as I have the same issue with multiple OpenGL Rust applications. Not only limited to egui. I occasionally develop via RDP on a windows machine. And I had success using the Mesa software renderer.

I found pre-built binaries for windows here: https://github.com/pal1000/mesa-dist-win which seem to work fine.

All I had to do was dumping the DLLs dxil.dll, libgallium_wgl.dll, libglapi.dll, opengl32.dll, opengl32sw.dll into the target/release directory for running from the repository via cargo run --release.