From bffc02c5f10f596df2acf42cde706653eef1450f Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Tue, 13 Jun 2017 16:52:17 +0200 Subject: [PATCH] glium: impl Facade --- src/backend/graphics/glium.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backend/graphics/glium.rs b/src/backend/graphics/glium.rs index a3629de..dacfb51 100644 --- a/src/backend/graphics/glium.rs +++ b/src/backend/graphics/glium.rs @@ -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 Deref for GliumGraphicsBackend { } } +impl Facade for GliumGraphicsBackend { + fn get_context(&self) -> &Rc { + &self.context + } +} + /// Converter trait to expose `glium` compatibility for all `EGLGraphicsBackend`s pub trait IntoGlium: EGLGraphicsBackend + Sized { /// Wrap the given `EGLGraphicsBackend` to a `GliumGraphicBackend`