Having trouble adapting minimal-egui example to my project #388
-
I have a very simple hobby project that I'm working on using the pixels crate. It's not that complicated - it's kind of like a blend of the minimal-winit and minimal-egui examples but with a more complex World struct / implementation. However I am having trouble incorporating egui into my project.. I'm getting errors from the gui component that I don't understand because I haven't changed a single line from the minimal-egui gui.rs file (which I have checked, compiles and runs on my computer). Mostly it seems like some functions are expecting to get inputs with types that come from the egui_wgpu crate but instead the inputs have similarly named types that come from the pixels crate. Again I did not change anything in gui.rs, and in main.rs the event loop is defined pretty much as close to the example as I could get it when troubleshooting. I also made sure my dependencies were the same as the minimal-egui example with the exception of adding kd-tree, rayon, and rand. Below I have pasted in the terminal output, main.rs, gui.rs, and Cargo.toml, in case it's useful to help. I really appreciate anyone who takes the time to read and offer advice / help - I'm pretty stuck. Thanks.
main.rs:
gui.rs:
Cargo.toml:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You've somehow imported wgpu 0.16 and 0.17 simultaneously. I'd do the following - if build still fails, post the output of to see where each version of wgpu is being imported |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer. cargo clean and then cargo update did not fix it, same build failure, same terminal output. cargo tree:
|
Beta Was this translation helpful? Give feedback.
looks like the cargo package is lagging behind the repo. crates.io still says wgpu dependency is 0.16.
try adding pixels as a dependency via git instead of cargo.
ie, instead of
pixels = "0.13.0"
do
pixels = { git = "https://github.com/parasyte/pixels.git" }
then do another
cargo update