diff options
author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-04-11 09:06:08 +0200 |
---|---|---|
committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-04-11 09:06:08 +0200 |
commit | 1e94d85d35eca41e2e54ed4880d62ec7473105f0 (patch) | |
tree | 9c167b145bf57b8eb37d4c7e79a8c305773fdb5e /src/win32/mod.rs | |
parent | 70d36a3d3d6afba3e89faf4d3979118f9c076fe9 (diff) | |
download | glutin-1e94d85d35eca41e2e54ed4880d62ec7473105f0.tar.gz glutin-1e94d85d35eca41e2e54ed4880d62ec7473105f0.zip |
Adds get_pixel_format() to Window
Diffstat (limited to 'src/win32/mod.rs')
-rw-r--r-- | src/win32/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/win32/mod.rs b/src/win32/mod.rs index 1f5f3c0..4a9dcbf 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -13,6 +13,7 @@ use libc; use {CreationError, Event, MouseCursor}; use CursorState; +use PixelFormat; use BuilderAttribs; pub use self::headless::HeadlessContext; @@ -53,6 +54,9 @@ pub struct Window { /// The current cursor state. cursor_state: Arc<Mutex<CursorState>>, + + /// The pixel format that has been used to create this window. + pixel_format: PixelFormat, } unsafe impl Send for Window {} @@ -258,6 +262,10 @@ impl Window { ::Api::OpenGl } + pub fn get_pixel_format(&self) -> PixelFormat { + self.pixel_format.clone() + } + pub fn set_window_resize_callback(&mut self, _: Option<fn(u32, u32)>) { } |