We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4db55ba + 3c6bda6 commit 82a0ca4Copy full SHA for 82a0ca4
sample/src/main.rs
@@ -73,12 +73,7 @@ fn main() {
73
gl::clear_color(0.3, 0.0, 0.0, 1.0);
74
}
75
76
- let version = unsafe {
77
- let data = CStr::from_ptr(gl::GetString(gl::VERSION) as *const _).to_bytes().to_vec();
78
- String::from_utf8(data).unwrap()
79
- };
80
-
81
- println!("OpenGL version {}", version);
+ println!("OpenGL version {}", gl::get_string(gl::VERSION));
82
println!("Shader resource path: {:?}", res_path);
83
84
let (width, height) = window.get_inner_size().unwrap();
0 commit comments