aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
authorDzmitry Malyshau <kvarkus@gmail.com>2015-04-29 23:05:47 -0400
committerDzmitry Malyshau <kvarkus@gmail.com>2015-04-30 22:50:15 -0400
commita42f1f58333a9899d36e18e641f3f52517dd58b1 (patch)
tree8e11e18d3bb3fc4f5a3a5a65eb7c895d515c105c /src/window.rs
parentc1ca5d1d87166daa20d4ae2a9a0a7c8d4ba2ba63 (diff)
downloadglutin-a42f1f58333a9899d36e18e641f3f52517dd58b1.tar.gz
glutin-a42f1f58333a9899d36e18e641f3f52517dd58b1.zip
Implemented gl_core flag
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs12
1 files changed, 9 insertions, 3 deletions
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<bool>) -> 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
}