aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/egl
diff options
context:
space:
mode:
authorPierre Krieger <pierre.krieger1708@gmail.com>2015-07-20 19:38:57 +0200
committerPierre Krieger <pierre.krieger1708@gmail.com>2015-07-20 19:38:57 +0200
commit43dabf131aa9f76610e1cfd0685e3b36de8c2ebd (patch)
tree602da832e457e13f384a87bef1705df0eea60434 /src/api/egl
parentba5adfa1e13e8be0dec888b3fbcb54fd30a9a673 (diff)
downloadglutin-43dabf131aa9f76610e1cfd0685e3b36de8c2ebd.tar.gz
glutin-43dabf131aa9f76610e1cfd0685e3b36de8c2ebd.zip
Add CreationError::OpenGlVersionNotSupported
Diffstat (limited to 'src/api/egl')
-rw-r--r--src/api/egl/mod.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/api/egl/mod.rs b/src/api/egl/mod.rs
index 3d6d681..328a11e 100644
--- a/src/api/egl/mod.rs
+++ b/src/api/egl/mod.rs
@@ -68,7 +68,7 @@ impl Context {
} else if egl.BindAPI(ffi::egl::OPENGL_ES_API) != 0 {
(None, Api::OpenGlEs)
} else {
- return Err(CreationError::NotSupported);
+ return Err(CreationError::OpenGlVersionNotSupported);
}
} else {
(None, Api::OpenGlEs)
@@ -77,21 +77,21 @@ impl Context {
GlRequest::Specific(Api::OpenGlEs, version) => {
if egl_version >= (1, 2) {
if egl.BindAPI(ffi::egl::OPENGL_ES_API) == 0 {
- return Err(CreationError::NotSupported);
+ return Err(CreationError::OpenGlVersionNotSupported);
}
}
(Some(version), Api::OpenGlEs)
},
GlRequest::Specific(Api::OpenGl, version) => {
if egl_version < (1, 4) {
- return Err(CreationError::NotSupported);
+ return Err(CreationError::OpenGlVersionNotSupported);
}
if egl.BindAPI(ffi::egl::OPENGL_API) == 0 {
- return Err(CreationError::NotSupported);
+ return Err(CreationError::OpenGlVersionNotSupported);
}
(Some(version), Api::OpenGl)
},
- GlRequest::Specific(_, _) => return Err(CreationError::NotSupported),
+ GlRequest::Specific(_, _) => return Err(CreationError::OpenGlVersionNotSupported),
GlRequest::GlThenGles { opengles_version, opengl_version } => {
if egl_version >= (1, 4) {
if egl.BindAPI(ffi::egl::OPENGL_API) != 0 {
@@ -99,7 +99,7 @@ impl Context {
} else if egl.BindAPI(ffi::egl::OPENGL_ES_API) != 0 {
(Some(opengles_version), Api::OpenGlEs)
} else {
- return Err(CreationError::NotSupported);
+ return Err(CreationError::OpenGlVersionNotSupported);
}
} else {
(Some(opengles_version), Api::OpenGlEs)
@@ -245,7 +245,7 @@ impl<'a> ContextPrototype<'a> {
{
ctxt
} else {
- return Err(CreationError::NotSupported);
+ return Err(CreationError::OpenGlVersionNotSupported);
}
} else {
@@ -267,7 +267,7 @@ impl<'a> ContextPrototype<'a> {
{
ctxt
} else {
- return Err(CreationError::NotSupported);
+ return Err(CreationError::OpenGlVersionNotSupported);
}
}
};
@@ -504,7 +504,7 @@ unsafe fn create_context(egl: &ffi::egl::Egl, display: ffi::egl::types::EGLDispl
if context.is_null() {
match egl.GetError() as u32 {
- ffi::egl::BAD_ATTRIBUTE => return Err(CreationError::NotSupported),
+ ffi::egl::BAD_ATTRIBUTE => return Err(CreationError::OpenGlVersionNotSupported),
e => panic!("eglCreateContext failed: 0x{:x}", e),
}
}