aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.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/lib.rs
parenta42f1f58333a9899d36e18e641f3f52517dd58b1 (diff)
downloadglutin-171986c7e86063862d16208296c011cd5828bcad.tar.gz
glutin-171986c7e86063862d16208296c011cd5828bcad.zip
Introduced GlProfile enum
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 713efef..d52077d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -137,6 +137,15 @@ pub enum Api {
WebGl,
}
+/// Describes the requested OpenGL context profiles.
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub enum GlProfile {
+ /// Include all the immediate more functions and definitions.
+ Compatibility,
+ /// Include all the future-compatible functions and definitions.
+ Core,
+}
+
/// Describes the OpenGL API and version that are being requested when a context is created.
#[derive(Debug, Copy, Clone)]
pub enum GlRequest {
@@ -277,7 +286,7 @@ pub struct BuilderAttribs<'a> {
title: String,
monitor: Option<platform::MonitorID>,
gl_version: GlRequest,
- gl_core: Option<bool>,
+ gl_profile: Option<GlProfile>,
gl_debug: bool,
vsync: bool,
visible: bool,
@@ -300,7 +309,7 @@ impl BuilderAttribs<'static> {
title: "glutin window".to_string(),
monitor: None,
gl_version: GlRequest::Latest,
- gl_core: None,
+ gl_profile: None,
gl_debug: cfg!(debug_assertions),
vsync: false,
visible: true,
@@ -327,7 +336,7 @@ impl<'a> BuilderAttribs<'a> {
title: self.title,
monitor: self.monitor,
gl_version: self.gl_version,
- gl_core: self.gl_core,
+ gl_profile: self.gl_profile,
gl_debug: self.gl_debug,
vsync: self.vsync,
visible: self.visible,