PistonDevelopers / conrod

An easy-to-use, 2D GUI library written entirely in Rust.
Other
3.35k stars 296 forks source link

conrod_glium::Renderer::new(&display) doesn't compile anymore #1444

Closed Earthcomputer closed 2 years ago

Earthcomputer commented 2 years ago

I'm getting this error:

error[E0277]: the trait bound `glium::Display: glium::backend::Facade` is not satisfied
   --> src/main.rs:41:52
    |
41  |     let mut renderer = conrod_glium::Renderer::new(&display).unwrap();
    |                        --------------------------- ^^^^^^^^ the trait `glium::backend::Facade` is not implemented for `glium::Display`
    |                        |
    |                        required by a bound introduced by this call
    |
note: required by a bound in `Renderer::new`
   --> /home/joe/.cargo/registry/src/github.com-1ecc6299db9ec823/conrod_glium-0.76.0/./src/lib.rs:455:12
    |
455 |         F: glium::backend::Facade,
    |            ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Renderer::new`

It seems like both the docs and examples are outdated, and I haven't been able to figure out how to fix the issue. Do you know what's going on?

Earthcomputer commented 2 years ago

For posterity, this was because I had a too new version of glium installed. I needed glium 0.28.0 and no later.