Skip to content
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

Egui supports #122

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Egui supports #122

wants to merge 3 commits into from

Conversation

Mehrbod2002
Copy link

Support egui as text renderer based on egui-wgpu

https://github.com/emilk/egui/tree/master/crates/egui-wgpu

Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
Signed-off-by: Amirhossein Akhlaghpour <m9.akhlaghpoor@gmail.com>
@grovesNL
Copy link
Owner

Hi! 👋 I'm not sure if I understand why we'd need to support egui directly in glyphon. It seems like matching the wgpu version should be enough to use glyphon with egui already? Please let me know if I'm missing something!

@Mehrbod2002
Copy link
Author

Mehrbod2002 commented Nov 30, 2024

Hi @grovesNL ,

I'll explain my situation as an example :
I wanted to create a project which user ables to draw and write down anywhere in windows like whiteboard . I need to working with egui which is compatible framework with wgpu right now . as egui for ui performance use its own application wgpu crate to render ui elements , I couldn't use glypthon for my app . then decide to crate this branch and now it's working great in my crate app , now i have ui , wgpu and glypthon together .

@grovesNL
Copy link
Owner

Ok thanks for the context. I think you should be able to use glyphon without any changes by making sure the wgpu version matches between glyohob and egui. Does that not work for you?

@Mehrbod2002
Copy link
Author

Mehrbod2002 commented Nov 30, 2024

@grovesNL

As I mentioned egui_wgpu and wgpu are similar crates , but can't use wgpu directly in wgpu not compatible and mismatch types error will occur. we have to use egui_wgpu instead .

@grovesNL
Copy link
Owner

That seems ok though - are you able to use glyphon with egui_wgpu?

I don't think we'll be able to depend on any UI crates directly in glyphon. You could look at iced to see how glyphon support works there as an example.

@Mehrbod2002
Copy link
Author

@grovesNL
Yes I am currently using it and works find with this branches .
I just create pull request though it will be useful who has the same problem too .

@grovesNL
Copy link
Owner

I mean you should be able to use them together like you're doing without the changes in this PR, if the wgpu versions are the same.

@Mehrbod2002
Copy link
Author

@grovesNL
No . it is impossible . egui has its own implementation and extras features for render by help of wgpu.

@grovesNL
Copy link
Owner

grovesNL commented Dec 3, 2024

@Mehrbod2002 have you checked some of the other approaches like https://github.com/StratusFearMe21/egui-glyphon ? This doesn't seem to require changes to glyphon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants