diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2016-01-28 22:44:12 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2016-01-28 22:44:12 +0100 |
commit | 5cdf6c17989196f295c336c54ac496335eba95a4 (patch) | |
tree | 1ef5fb608bafb13788be524f563bb085572fb631 | |
parent | 50c7c91c1998c70f26c3c0a478b5c8a8b93edb0c (diff) | |
parent | c67e43d076109c8b6b884ccb47bb48d6765828ea (diff) | |
download | glutin-5cdf6c17989196f295c336c54ac496335eba95a4.tar.gz glutin-5cdf6c17989196f295c336c54ac496335eba95a4.zip |
Merge pull request #715 from mbrubeck/glx-double-buffer
Use double buffering by default on GLX
-rw-r--r-- | src/api/glx/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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() { |