mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Pass the GL context to the VRDisplay when rendering
This commit is contained in:
parent
42ebf46172
commit
8ddde7eacc
7 changed files with 34 additions and 22 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue