aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/window.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/window.rs b/examples/window.rs
index 5d12c59..39dd014 100644
--- a/examples/window.rs
+++ b/examples/window.rs
@@ -11,11 +11,20 @@ fn main() {
gl::load_with(|symbol| window.get_proc_address(symbol) as *const libc::c_void);
+ let version = {
+ use std::c_str::CString;
+ unsafe { CString::new(gl::GetString(gl::VERSION) as *const i8, false) }
+ };
+
+ println!("OpenGL version {}", version.as_str().unwrap());
+
gl::ClearColor(0.0, 1.0, 0.0, 1.0);
while !window.should_close() {
println!("{}", window.wait_events());
+ println!("pos: {}", window.get_position());
+
gl::Clear(gl::COLOR_BUFFER_BIT);
window.swap_buffers();