diff options
author | natrixaeria <janng@gmx.de> | 2019-06-13 01:34:35 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-06-13 01:34:35 +0200 |
commit | 5de862b4d175578ed67e177d482ac31bf811d486 (patch) | |
tree | 4a242157e34abf92f572b8f0b2135db0f44fc17e /webhogg/wasm/src/graphics.rs | |
parent | c3fdf122bd874bd0aedf90eff0d57cc440fc6421 (diff) |
Create a WebGl2 context
Diffstat (limited to 'webhogg/wasm/src/graphics.rs')
-rw-r--r-- | webhogg/wasm/src/graphics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webhogg/wasm/src/graphics.rs b/webhogg/wasm/src/graphics.rs index 8169a3c..a879c5e 100644 --- a/webhogg/wasm/src/graphics.rs +++ b/webhogg/wasm/src/graphics.rs @@ -3,11 +3,11 @@ use log::*; use crate::*; #[wasm_bindgen] -pub fn start_graphics() { +pub fn start_graphics(canvas: web_sys::OffscreenCanvas) { logger::init_logger(); info!("graphics: wasm entry-point reached"); - match context::graphics::GraphicsContext::from_canvas() { + match context::graphics::GraphicsContext::from_canvas(canvas) { Ok(ctx) => context::set_graphics(ctx), Err(e) => error!("graphics {}", e) } |