Pass the GL context to the VRDisplay when rendering

This commit is contained in:
Alan Jeffrey 2019-02-21 13:38:19 -06:00
parent 42ebf46172
commit 8ddde7eacc
7 changed files with 34 additions and 22 deletions

View file

@ -11,6 +11,7 @@ use canvas_traits::webgl::{WebGLSender, WebVRCommand, WebVRRenderHandler};
use euclid::Size2D;
use fnv::FnvHashMap;
use gleam::gl;
use gleam::gl::Gl;
use servo_config::prefs::PREFS;
use std::rc::Rc;
@ -112,8 +113,8 @@ impl WebGLExternalImageApi for WebGLExternalImages {
struct WebVRRenderWrapper(Box<dyn WebVRRenderHandler>);
impl WebVRRenderHandler for WebVRRenderWrapper {
fn handle(&mut self, command: WebVRCommand, texture: Option<(u32, Size2D<i32>)>) {
self.0.handle(command, texture);
fn handle(&mut self, gl: &dyn Gl, command: WebVRCommand, texture: Option<(u32, Size2D<i32>)>) {
self.0.handle(gl, command, texture);
}
}