aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
authorDzmitry Malyshau <kvarkus@gmail.com>2015-04-30 23:06:22 -0400
committerDzmitry Malyshau <kvarkus@gmail.com>2015-05-01 07:32:48 -0400
commit171986c7e86063862d16208296c011cd5828bcad (patch)
treee750667b22097fba290848ed2510bd67a80a6ae6 /src/window.rs
parenta42f1f58333a9899d36e18e641f3f52517dd58b1 (diff)
downloadglutin-171986c7e86063862d16208296c011cd5828bcad.tar.gz
glutin-171986c7e86063862d16208296c011cd5828bcad.zip
Introduced GlProfile enum
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs13
1 files changed, 7 insertions, 6 deletions
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<bool>) -> WindowBuilder<'a> {
+ self.attribs.srgb = srgb_enabled;
self
}