jbrd / glium_shapes

Prefabricated shapes for the Glium OpenGL library.
MIT License
5 stars 4 forks source link

Update to glium = "0.30.2" #3

Open felipetesc opened 2 years ago

felipetesc commented 2 years ago

Hello. Nice crate. Donno if You are still updating this lib, but since no messages can be found about that on the readme, I've decided to open this issue.

I'm trying to run the code bellow:

let cuboid = glium_shapes::cuboid::CuboidBuilder::new();
            cuboid.scale(2.0, 3.0, 4.0)
            .translate(0.0, 1.5, 0.0)
            .build(display)
            .expect("Failed to build cuboid shape");

But I get this error :

mismatched types expected reference, found struct `glium::Display`

So I add & to fix it and I get this other error :

the trait bound `glium::Display: glium::backend::Facade` is not satisfied

the trait `glium::backend::Facade` is not implemented for `glium::Display`

note: perhaps two different versions of crate `glium` are being used?rustc(E0277)
app.rs(246, 20): the trait `glium::backend::Facade` is not implemented for `glium::Display`

Perhaps a new updated to glium_shapes is needed?

To make things easier, I found at https://github.com/tomaka/glium_text/issues/18 almost the same problem. I'm guessing some breaking changes happened.

I'll clone your crate and try to fix, but I really don't know what to do right now and if things will work it out.

But, hey! Thanks for the crate .

lukas-shawford commented 2 years ago

Ran into same issue here. Submitted PR to upgrade: https://github.com/jbrd/glium_shapes/pull/4

In the meantime, you can point directly at my branch:

Cargo.toml:

glium_shapes = { git = "https://github.com/sergkr/glium_shapes", branch = "glium-0.32.2" }