aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml2
-rw-r--r--README.md2
-rw-r--r--src/api/glx/mod.rs7
-rw-r--r--src/platform/linux/api_dispatch.rs4
4 files changed, 7 insertions, 8 deletions
diff --git a/Cargo.toml b/Cargo.toml
index f5de946..b83af51 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "glutin"
-version = "0.4.5"
+version = "0.4.6"
authors = ["tomaka <pierre.krieger1708@gmail.com>"]
description = "Cross-platform OpenGL context provider."
keywords = ["windowing", "opengl"]
diff --git a/README.md b/README.md
index 9ca5757..ca079cb 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ fn main() {
unsafe { window.make_current() };
unsafe {
- gl::load_with(|symbol| window.get_proc_address(symbol));
+ gl::load_with(|symbol| window.get_proc_address(symbol) as *const _);
gl::ClearColor(0.0, 1.0, 0.0, 1.0);
}
diff --git a/src/api/glx/mod.rs b/src/api/glx/mod.rs
index d3f28ed..95b6f99 100644
--- a/src/api/glx/mod.rs
+++ b/src/api/glx/mod.rs
@@ -415,10 +415,9 @@ unsafe fn choose_fbconfig(glx: &ffi::glx::Glx, extensions: &str, xlib: &ffi::Xli
out.push(stencil as c_int);
}
- if let Some(double_buffer) = reqs.double_buffer {
- out.push(ffi::glx::DOUBLEBUFFER as c_int);
- out.push(if double_buffer { 1 } else { 0 });
- }
+ let double_buffer = reqs.double_buffer.unwrap_or(true);
+ out.push(ffi::glx::DOUBLEBUFFER as c_int);
+ out.push(if double_buffer { 1 } else { 0 });
if let Some(multisampling) = reqs.multisampling {
if extensions.split(' ').find(|&i| i == "GLX_ARB_multisample").is_some() {
diff --git a/src/platform/linux/api_dispatch.rs b/src/platform/linux/api_dispatch.rs
index 8bf0ae5..2373770 100644
--- a/src/platform/linux/api_dispatch.rs
+++ b/src/platform/linux/api_dispatch.rs
@@ -399,8 +399,8 @@ unsafe extern "C" fn x_error_callback(dpy: *mut x11::ffi::Display, event: *mut x
if let Backend::X(ref x) = *BACKEND {
let mut buff: Vec<u8> = Vec::with_capacity(1024);
- (x.xlib.XGetErrorText)(dpy, (*event).error_code as i32, buff.as_mut_ptr() as *mut i8, buff.capacity() as i32);
- let description = CStr::from_ptr(buff.as_mut_ptr() as *const i8).to_string_lossy();
+ (x.xlib.XGetErrorText)(dpy, (*event).error_code as i32, buff.as_mut_ptr() as *mut libc::c_char, buff.capacity() as i32);
+ let description = CStr::from_ptr(buff.as_mut_ptr() as *const libc::c_char).to_string_lossy();
let error = XError {
description: description.into_owned(),