-
Notifications
You must be signed in to change notification settings - Fork 256
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
Add worldspace egui #214
Add worldspace egui #214
Conversation
Hi, @mvlabat what do you think I should take as the next steps for getting this mergeable? |
src/render_systems.rs
Outdated
pub struct ExtractedEguiSettings(pub EguiSettings); | ||
/// The extracted version of [`EguiManagedTextures`]. | ||
#[derive(Debug, Resource)] | ||
pub struct ExtractedEguiManagedTextures(pub HashMap<(Entity, u64), Handle<Image>>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's turn this (Entity, u64)
tuple into a struct, named fields will help to understand what Entity
and u64
are related to.
@TheButlah apologies for the delayed response. I'm yet to take a closer look to better answer the question. And I'll need to re-read our Discord DM to remember all the context :) |
979ed1a
to
278bae4
Compare
Just completed this :) However, the cube now looks like this: It turns out, this is identical to what I get when I When I was doing my experiments with wgpu directly, this would happen when the I'll need to revise the PR to fix it, but feel free for someone to suggest a fix if they know what the issue is! |
278bae4
to
7124092
Compare
7124092
to
9b2fcb0
Compare
Are you going to convert this to not a draft? It looks very useful.... |
Merged as part of #304. Thank you so much for your initial work on this! |
Rebased on #210 and #211.
Adds worldspace UI to
bevy_egui
via theEguiRenderToTexture
component. Handling input is not implemented in this PR.This PR is marked as a draft, because I thought that I could have multiple StandardMaterials on the same mesh, but that is not the case right now in bevy. This means that a user cannot easily have a base texture and then apply the egui overlaid transparently on top.
I think the right solution is likely to include an
EguiMaterial
as part of this plugin for users' convenience, and keep theEguiRenderToTexture
as an option for people to use if they want to create their own custom materials. I don't have any experience with bevy materials yet, so I will revisit that later.I'm also not particularly happy with my refactor - I feel like the systems could be unified more - there is still some branching logic to handle windows vs textures.