Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

WIP Update egui to 0.24 #16

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Dec 12, 2023

This currently fails to compile:

error[E0308]: mismatched types
   --> src/lib.rs:289:58
    |
289 |                     .with_context(|context| Painter::new(context.clone(), "", None))?
    |                                             ------------ ^^^^^^^^^^^^^^^ expected `Rc<Context>`, found `Arc<Context>`
    |                                             |
    |                                             arguments to this function are incorrect
    |
    = note: expected struct `Rc<egui_glow::painter::Context>`
               found struct `Arc<egui_glow::painter::Context

emilk/egui#3598 changed this to use Rc instead of Arc. Smithay's GlowRenderer::with_context passes an &Arc<Context>. Not sure what can be done other than Smithay using Rc, or using a different glow context for egui...

@Drakulix
Copy link
Member

Drakulix commented Dec 12, 2023

I guess we can try to change this to an Rc in smithay and see if something breaks. Theoretically these contexts are thread-safe, as long as they are not current in multiple threads. So I really don't get why egui made this super unnecessary change. Maybe we should open an issue with them. Ah so this is an issue with glow...

Worst case, if both are not an option, would be to create a shared context for egui...

@Drakulix
Copy link
Member

Seems they have fixed this after the 0.13 release...
grovesNL/glow@edfd08e

sigh

Maybe we can convince egui to change that back, once there is a new glow release. (and then wait for the next egui release? this sucks, maybe we should just temporarily patch this with git dependencies...)

@Drakulix
Copy link
Member

Looks like egui will fix this in 0.25 again, so lets wait for that I suppose: emilk/egui#3646

@ids1024
Copy link
Member Author

ids1024 commented Dec 20, 2023

Annoying, but it it will eventually be fixed in an update, I suppose.

@nferhat
Copy link

nferhat commented May 26, 2024

This is now fixed, but needs update in smithay's glow (update to 0.13) for 0.25 and above

@Drakulix
Copy link
Member

This is now fixed, but needs update in smithay's glow (update to 0.13) for 0.25 and above

PRs welcome :)

@ids1024
Copy link
Member Author

ids1024 commented Jul 25, 2024

We can see if things are working properly with the newly released glow 0.14, once emilk/egui#4833 is released.

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

Successfully merging this pull request may close these issues.

3 participants