From 2d20050b892f37bb7f7c02aa4408b8627649f8e1 Mon Sep 17 00:00:00 2001 From: Daggerbot Date: Thu, 9 Apr 2015 10:38:58 +0000 Subject: Using `x11-rs` and `osmesa-rs`. --- src/x11/headless.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/x11/headless.rs') diff --git a/src/x11/headless.rs b/src/x11/headless.rs index 291f04d..8dffdea 100644 --- a/src/x11/headless.rs +++ b/src/x11/headless.rs @@ -22,7 +22,7 @@ impl HeadlessContext { buffer: ::std::iter::repeat(unsafe { mem::uninitialized() }) .take((dimensions.0 * dimensions.1) as usize).collect(), context: unsafe { - let ctxt = ffi::OSMesaCreateContext(0x1908, ptr::null()); + let ctxt = ffi::OSMesaCreateContext(0x1908, ptr::null_mut()); if ctxt.is_null() { return Err(OsError("OSMesaCreateContext failed".to_string())); } @@ -49,7 +49,7 @@ impl HeadlessContext { unsafe { use std::ffi::CString; let c_str = CString::new(addr.as_bytes().to_vec()).unwrap(); - ffi::OSMesaGetProcAddress(mem::transmute(c_str.as_ptr())) as *const () + mem::transmute(ffi::OSMesaGetProcAddress(mem::transmute(c_str.as_ptr()))) } } -- cgit v1.2.3