glium: impl Facade
This commit is contained in:
parent
d819e15e29
commit
bffc02c5f1
|
@ -3,7 +3,7 @@
|
|||
use backend::graphics::egl::{EGLGraphicsBackend, SwapBuffersError};
|
||||
use glium::Frame;
|
||||
use glium::SwapBuffersError as GliumSwapBuffersError;
|
||||
use glium::backend::{Backend, Context};
|
||||
use glium::backend::{Backend, Context, Facade};
|
||||
use glium::debug::DebugCallbackBehavior;
|
||||
use std::ops::Deref;
|
||||
use std::os::raw::c_void;
|
||||
|
@ -63,6 +63,12 @@ impl<T: EGLGraphicsBackend> Deref for GliumGraphicsBackend<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: EGLGraphicsBackend> Facade for GliumGraphicsBackend<T> {
|
||||
fn get_context(&self) -> &Rc<Context> {
|
||||
&self.context
|
||||
}
|
||||
}
|
||||
|
||||
/// Converter trait to expose `glium` compatibility for all `EGLGraphicsBackend`s
|
||||
pub trait IntoGlium: EGLGraphicsBackend + Sized {
|
||||
/// Wrap the given `EGLGraphicsBackend` to a `GliumGraphicBackend`
|
||||
|
|
Loading…
Reference in New Issue