From 37bdb997cea05064ed6ad56f51fb2194e176a070 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sun, 9 Nov 2014 20:12:41 +0100 Subject: Remove call to glViewport in X11 implementation --- src/x11/window/mod.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs index 38b4559..64461a8 100644 --- a/src/x11/window/mod.rs +++ b/src/x11/window/mod.rs @@ -254,9 +254,6 @@ impl Window { context }; - // Make context current before call to glViewport below. - unsafe { ffi::glx::MakeCurrent(display, window, context) }; - // creating the window object let window = Window { display: display, @@ -272,16 +269,6 @@ impl Window { current_size: Cell::new((0, 0)), }; - // calling glViewport - unsafe { - let ptr = window.get_proc_address("glViewport"); - assert!(!ptr.is_null()); - let ptr: extern "system" fn(libc::c_int, libc::c_int, libc::c_int, libc::c_int) = - mem::transmute(ptr); - let dimensions = window.get_inner_size().unwrap(); - ptr(0, 0, dimensions.val0() as libc::c_int, dimensions.val1() as libc::c_int); - } - // returning Ok(window) } -- cgit v1.2.3