tomaka / glium_text

Text rendering with glium
48 stars 35 forks source link

Facade not implemented for GlutinFacade #18

Closed colrdavidson closed 8 years ago

colrdavidson commented 8 years ago

When running both my own code and the hello world example provided, verbatim, Rust appears unable to find the glium::backend::Facade trait or glium::Surface, regardless of the fact that I have glium::Surface and glium::DisplayBuild used.

src/main.rs:14:18: 14:45 error: the trait `glium::backend::Facade` is not implemented for the type `glium::backend::glutin_backend::GlutinFacade` [E0277]
src/main.rs:14     let system = glium_text::TextSystem::new(&display);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.rs:14:18: 14:45 help: run `rustc --explain E0277` to see a detailed explanation
src/main.rs:14:18: 14:45 note: required by `glium_text::TextSystem::new`
src/main.rs:16:16: 16:44 error: the trait `glium::backend::Facade` is not implemented for the type `glium::backend::glutin_backend::GlutinFacade` [E0277]
src/main.rs:16     let font = glium_text::FontTexture::new(&display, &include_bytes!("font.ttf")[..], 70).unwrap();
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/main.rs:16:16: 16:44 help: run `rustc --explain E0277` to see a detailed explanation
src/main.rs:16:16: 16:44 note: required by `glium_text::FontTexture::new`
src/main.rs:36:9: 36:25 error: the trait `glium::Surface` is not implemented for the type `glium::Frame` [E0277]
src/main.rs:36         glium_text::draw(&text, &system, &mut target, matrix, (1.0, 1.0, 0.0, 1.0));
tomaka commented 8 years ago

That's probably because the version of glium used by this crate and the version of glium that you use don't match.

tomaka commented 8 years ago

I just published version 0.9 of glium_text that uses glium 0.14

colrdavidson commented 8 years ago

Thanks!