EGUI Textures
#4747
Replies: 1 comment 1 reply
-
I'm trying to working on the samething too. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context: I’ve been working on a small program that will become a real time ray tracer. At this point, all I want is a window that opens and displays a panel on the left with data/controls, and then a central panel that will use wgpu to draw data that I put into an array of u8. The egui_app_demo and Custom3D was my learning template, and I basically got that up and running.
Along the way, I struggled with modifying the wgpu texture. In the end I solved my issue by sending the texture created in the constructor with device.new_texture along with the callback resources (instead of the uniform buffer that was sent in Custom3D), and then used queue.write_texture in the prepare method with new data.
I spent a lot of time trying to get TextureID and TextureHandle and such to work, but I ended up deciding that they were doing something a little different than what I wanted (but perhaps I’m wrong). I couldn’t understand why I could create a texture with device.create and even used renderer to get a TextureID, but couldn’t use any of those things to get a TextureHandle.
Am I correct in concluding that using commands like egui::Context::load_texture and TextureHandle::set are for using egui textures that you’d draw with e.g., ui.paint and aren’t interacting with the original wgpu texture? I’m clearly super confused about this issue.
More generally: I’ve looked at the wgpu tutorial, but feel like I’m miles away from understanding how this all works in a way where I can create something new on my own for whatever task I’m implementing.
Where can I learn more about render passes, textures, buffers, etc.? Later, when I want to start moving my (now) CPU based ray tracer to the GPU, I feel like I’m going to need to know a lot more about setting binding groups and buffers and creating new pipelines, instances…is there a resource where I can really get into the weeds?
Any suggestions would be appreciated! Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions