From a42f1f58333a9899d36e18e641f3f52517dd58b1 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 29 Apr 2015 23:05:47 -0400 Subject: Implemented gl_core flag --- src/window.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/window.rs') diff --git a/src/window.rs b/src/window.rs index 7508f32..8898e1e 100644 --- a/src/window.rs +++ b/src/window.rs @@ -67,6 +67,12 @@ 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); + self + } + /// Sets the *debug* flag for the OpenGL context. /// /// The default value for this flag is `cfg!(debug_assertions)`, which means that it's enabled @@ -124,9 +130,9 @@ impl<'a> WindowBuilder<'a> { self } - /// 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; + /// Sets whether sRGB should be enabled on the window. + pub fn with_srgb(mut self, srgb: bool) -> WindowBuilder<'a> { + self.attribs.srgb = Some(srgb); self } -- cgit v1.2.3