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

@ -4,6 +4,7 @@
use euclid::{Rect, Size2D};
use gleam::gl;
use gleam::gl::Gl;
use ipc_channel::ipc::{IpcBytesReceiver, IpcBytesSender, IpcSharedMemory};
use offscreen_gl_context::{GLContextAttributes, GLLimits};
use pixels::PixelFormat;
@ -521,7 +522,7 @@ pub enum WebVRCommand {
// Trait object that handles WebVR commands.
// Receives the texture id and size associated to the WebGLContext.
pub trait WebVRRenderHandler: Send {
fn handle(&mut self, command: WebVRCommand, texture: Option<(u32, Size2D<i32>)>);
fn handle(&mut self, gl: &dyn Gl, command: WebVRCommand, texture: Option<(u32, Size2D<i32>)>);
}
/// WebGL commands required to implement DOMToTexture feature.