--- a/rust/lib-hedgewars-engine/Cargo.toml Fri Mar 22 20:26:29 2019 +0300
+++ b/rust/lib-hedgewars-engine/Cargo.toml Fri Mar 22 20:37:21 2019 +0300
@@ -6,8 +6,6 @@
[dependencies]
gl = "0.11"
-#gfx = "0.17"
-#gfx_device_gl = "0.15"
netbuf = "0.4"
fpnum = { path = "../fpnum" }
--- 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);
}