rust/lib-hedgewars-engine/src/lib.rs
changeset 14727 88b0efba77b9
parent 14726 19122a329774
child 14728 5237b4c44d11
--- a/rust/lib-hedgewars-engine/src/lib.rs	Fri Mar 22 20:26:29 2019 +0300
+++ b/rust/lib-hedgewars-engine/src/lib.rs	Fri Mar 22 20:37:21 2019 +0300
@@ -81,6 +81,11 @@
     height: u16,
     gl_loader: extern "C" fn(*const c_char) -> *const c_void,
 ) {
+    gl::load_with(|name| {
+        let c_name = CString::new(name).unwrap();
+        gl_loader(c_name.as_ptr())
+    });
+    unsafe { gl::Viewport(0, 0, width as i32, height as i32); }
     engine_state.world.create_renderer(width, height);
 }