Zheoni / bevy_pixel_buffer

A library to draw pixels in bevy
MIT License
42 stars 7 forks source link

fill_egui example not working #13

Closed KirkBuah closed 7 months ago

KirkBuah commented 7 months ago

I'm trying to run the example with bevy 0.12.1, bevy_pixel_buffer 0.6.1 and bevy_egui 0.24.

This is the error i get:

error[E0599]: no method named `update_fill_egui` found for struct `bevy_pixel_buffer::query::QueryPixelBuffer<'_, '_>` in the current scope
  --> src\main.rs:32:12
   |
32 |         pb.update_fill_egui(ui.available_size());
   |            ^^^^^^^^^^^^^^^^ method not found in `QueryPixelBuffer<'_, '_>`
Zheoni commented 7 months ago

The egui feature is disabled by default. If you are running the example directly you need to pass --features "egui" or if you added bevy_pixel_buffer to your Cargo.toml you need to enable the feature like

[dependencies]
bevy_pixel_buffer = { version = "0.6.1", features = ["egui"] }

Does this solve the problem?

KirkBuah commented 7 months ago

The new error is now:

error[E0308]: mismatched types
   --> src\main.rs:32:29
    |
32  |         pb.update_fill_egui(ui.available_size());
    |            ---------------- ^^^^^^^^^^^^^^^^^^^ expected `Vec2`, found `bevy_egui::egui::Vec2`
    |            |
    |            arguments to this method are incorrect
    |
    = note: `bevy_egui::egui::Vec2` and `Vec2` have similar names, but are actually distinct types

Which i don't fully understand, since both are the same type

Zheoni commented 7 months ago

Ok, that's because bevy_egui has not been updated in this crate. You have to use the same version of bevy_egui and it's outdated here. I will update the bevy_egui required version with the next bevy release, so until then you have to use bevy_egui version, 0.23

KirkBuah commented 7 months ago

Thank you for your answer. Sadly i still get an error:

error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1
  |
  = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m64" "-Wl,--high-entropy-v... (it's very long)
  = note: ld: cannot find -lshlwapi: No such file or directory

I tried googling it and i think it has something to do with the way rustup was installed.

I'll try reinstalling it tomorrow and i'll let you know if it works.

KirkBuah commented 7 months ago

Ok i reinstalled rustup and it works as intended now. Thanks!

Zheoni commented 7 months ago

Awesome! Have fun with bevy 😄