From 171986c7e86063862d16208296c011cd5828bcad Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Thu, 30 Apr 2015 23:06:22 -0400 Subject: Introduced GlProfile enum --- src/window.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/window.rs') diff --git a/src/window.rs b/src/window.rs index 8898e1e..c21b82d 100644 --- a/src/window.rs +++ b/src/window.rs @@ -7,6 +7,7 @@ use CreationError; use CursorState; use Event; use GlContext; +use GlProfile; use GlRequest; use MouseCursor; use PixelFormat; @@ -67,9 +68,9 @@ impl<'a> WindowBuilder<'a> { self } - /// Sets the Core/Compatibility flag of the created OpenGL context. - pub fn with_gl_core_profile(mut self, core: bool) -> WindowBuilder<'a> { - self.attribs.gl_core = Some(core); + /// Sets the desired OpenGL context profile. + pub fn with_gl_profile(mut self, profile: GlProfile) -> WindowBuilder<'a> { + self.attribs.gl_profile = Some(profile); self } @@ -130,9 +131,9 @@ impl<'a> WindowBuilder<'a> { self } - /// Sets whether sRGB should be enabled on the window. - pub fn with_srgb(mut self, srgb: bool) -> WindowBuilder<'a> { - self.attribs.srgb = Some(srgb); + /// Sets whether sRGB should be enabled on the window. `None` means "I don't care". + pub fn with_srgb(mut self, srgb_enabled: Option) -> WindowBuilder<'a> { + self.attribs.srgb = srgb_enabled; self } -- cgit v1.2.3