aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11/headless.rs
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-04-17 17:42:46 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-04-17 17:42:46 +0200
commit2d7a800aee903982ea6d254b0cd91f3d4ea46868 (patch)
treed18657bc36c7d15b6050ac8f697478e39532b0fb /src/x11/headless.rs
parente2307f31137cf438de8f064f2b2487aa92543ca2 (diff)
parentc9194e922e3a60e8511cba8f50472f1f3457ddad (diff)
downloadglutin-2d7a800aee903982ea6d254b0cd91f3d4ea46868.tar.gz
glutin-2d7a800aee903982ea6d254b0cd91f3d4ea46868.zip
Merge pull request #368 from Daggerbot/wip
Using `x11-rs` and `osmesa-rs`.
Diffstat (limited to 'src/x11/headless.rs')
-rw-r--r--src/x11/headless.rs4
1 files changed, 2 insertions, 2 deletions
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())))
}
}