aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-04-17 17:58:28 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-04-17 17:59:37 +0200
commit677e69fd3aa29fc01a836e1b6d58788ecfc89ab0 (patch)
treedffd3397c9f48271d5f260ba21eb9fdc8b406623 /src
parent2d7a800aee903982ea6d254b0cd91f3d4ea46868 (diff)
downloadglutin-677e69fd3aa29fc01a836e1b6d58788ecfc89ab0.tar.gz
glutin-677e69fd3aa29fc01a836e1b6d58788ecfc89ab0.zip
Fix compilation on linux
Diffstat (limited to 'src')
-rw-r--r--src/x11/window/mod.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/x11/window/mod.rs b/src/x11/window/mod.rs
index 84b9625..9f600a8 100644
--- a/src/x11/window/mod.rs
+++ b/src/x11/window/mod.rs
@@ -386,20 +386,20 @@ impl Window {
let pixel_format = {
let get_attrib = |attrib: libc::c_int| -> i32 {
let mut value = 0;
- unsafe { ffi::glx::GetFBConfigAttrib(display, fb_config, attrib, &mut value); }
+ unsafe { ffi::glx::GetFBConfigAttrib(display as *mut _, fb_config, attrib, &mut value); }
value
};
PixelFormat {
hardware_accelerated: true,
- red_bits: get_attrib(ffi::GLX_RED_SIZE) as u8,
- green_bits: get_attrib(ffi::GLX_GREEN_SIZE) as u8,
- blue_bits: get_attrib(ffi::GLX_BLUE_SIZE) as u8,
- alpha_bits: get_attrib(ffi::GLX_ALPHA_SIZE) as u8,
- depth_bits: get_attrib(ffi::GLX_DEPTH_SIZE) as u8,
- stencil_bits: get_attrib(ffi::GLX_STENCIL_SIZE) as u8,
- stereoscopy: get_attrib(ffi::GLX_STEREO) != 0,
- double_buffer: get_attrib(ffi::GLX_DOUBLEBUFFER) != 0,
+ red_bits: get_attrib(ffi::glx::RED_SIZE as libc::c_int) as u8,
+ green_bits: get_attrib(ffi::glx::GREEN_SIZE as libc::c_int) as u8,
+ blue_bits: get_attrib(ffi::glx::BLUE_SIZE as libc::c_int) as u8,
+ alpha_bits: get_attrib(ffi::glx::ALPHA_SIZE as libc::c_int) as u8,
+ depth_bits: get_attrib(ffi::glx::DEPTH_SIZE as libc::c_int) as u8,
+ stencil_bits: get_attrib(ffi::glx::STENCIL_SIZE as libc::c_int) as u8,
+ stereoscopy: get_attrib(ffi::glx::STEREO as libc::c_int) != 0,
+ double_buffer: get_attrib(ffi::glx::DOUBLEBUFFER as libc::c_int) != 0,
multisampling: if get_attrib(ffi::glx::SAMPLE_BUFFERS as libc::c_int) != 0 {
Some(get_attrib(ffi::glx::SAMPLES as libc::c_int) as u16)
}else { None },