aboutsummaryrefslogtreecommitdiffstats
path: root/examples/support/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/support/mod.rs')
-rw-r--r--examples/support/mod.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/support/mod.rs b/examples/support/mod.rs
index 02079fd..7144952 100644
--- a/examples/support/mod.rs
+++ b/examples/support/mod.rs
@@ -1,8 +1,5 @@
#![cfg(feature = "window")]
-#[no_link]
-extern crate gl_generator;
-
use glutin;
#[cfg(not(target_os = "android"))]
@@ -24,9 +21,8 @@ pub fn load(window: &glutin::Window) -> Context {
let gl = gl::Gl::load(window);
let version = unsafe {
- use std::ffi::c_str_to_bytes;
- let ref version = gl.GetString(gl::VERSION) as *const i8;
- String::from_utf8_lossy(c_str_to_bytes(version)).into_owned()
+ use std::ffi;
+ ffi::c_str_to_bytes(&(gl.GetString(gl::VERSION) as *const i8)).to_string()
};
println!("OpenGL version {}", version);