diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2014-11-24 19:35:31 +0100 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2014-11-27 15:26:42 +0100 |
commit | 729551f82859673fcf9b4b26dbb145184a2a7ca7 (patch) | |
tree | 6e556313801c3d959ae3d05455deadd66797dcd0 /src/win32 | |
parent | 596132dc9300f43385e5bb8c3f24df49cfe8529d (diff) | |
download | glutin-729551f82859673fcf9b4b26dbb145184a2a7ca7.tar.gz glutin-729551f82859673fcf9b4b26dbb145184a2a7ca7.zip |
Implement multisampling for x11
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/init.rs | 3 | ||||
-rw-r--r-- | src/win32/mod.rs | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/win32/init.rs b/src/win32/init.rs index 29b45cb..62c1f54 100644 --- a/src/win32/init.rs +++ b/src/win32/init.rs @@ -16,7 +16,8 @@ pub fn new_window(builder_dimensions: Option<(uint, uint)>, builder_title: Strin builder_monitor: Option<super::MonitorID>, builder_gl_version: Option<(uint, uint)>, builder_debug: bool, builder_vsync: bool, builder_hidden: bool, - builder_sharelists: Option<ffi::HGLRC>) -> Result<Window, CreationError> + builder_sharelists: Option<ffi::HGLRC>, builder_multisampling: Option<u16>) + -> Result<Window, CreationError> { use std::mem; use std::os; diff --git a/src/win32/mod.rs b/src/win32/mod.rs index ef2e3ea..f08c033 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -26,7 +26,7 @@ impl HeadlessContext { pub fn new(builder: HeadlessRendererBuilder) -> Result<HeadlessContext, CreationError> { let HeadlessRendererBuilder { dimensions, gl_version, gl_debug } = builder; init::new_window(Some(dimensions), "".to_string(), None, gl_version, gl_debug, false, true, - None) + None, None) .map(|w| HeadlessContext(w)) } @@ -70,9 +70,9 @@ impl Window { /// See the docs in the crate root file. pub fn new(builder: WindowBuilder) -> Result<Window, CreationError> { let WindowBuilder { dimensions, title, monitor, gl_version, - gl_debug, vsync, visible, sharing } = builder; + gl_debug, vsync, visible, sharing, multisampling } = builder; init::new_window(dimensions, title, monitor, gl_version, gl_debug, vsync, - !visible, sharing.map(|w| w.window.context)) + !visible, sharing.map(|w| w.window.context), multisampling) } } |