aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/wgl
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-07-21 17:49:52 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-07-21 17:49:52 +0200
commit04a651320ba00571a0b2af9ae25c6d6c696c2803 (patch)
tree7ba2cf8fbc9ebd9acb1f7854ee4bfef7a5028a44 /src/api/wgl
parentca1eb8dc533301060e2b2768646b15d79c8be60c (diff)
parent7fe828bed3c1e01c0868d83eada0f2f36209c989 (diff)
downloadglutin-04a651320ba00571a0b2af9ae25c6d6c696c2803.tar.gz
glutin-04a651320ba00571a0b2af9ae25c6d6c696c2803.zip
Merge pull request #532 from tomaka/precise-errors
Precise errors
Diffstat (limited to 'src/api/wgl')
-rw-r--r--src/api/wgl/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/wgl/mod.rs b/src/api/wgl/mod.rs
index 222620c..89538f1 100644
--- a/src/api/wgl/mod.rs
+++ b/src/api/wgl/mod.rs
@@ -235,7 +235,7 @@ unsafe fn create_context(extra: Option<(&gl::wgl_extra::Wgl, &BuilderAttribs<'st
attributes.push(gl::wgl_extra::CONTEXT_PROFILE_MASK_ARB as libc::c_int);
attributes.push(gl::wgl_extra::CONTEXT_ES2_PROFILE_BIT_EXT as libc::c_int);
} else {
- return Err(CreationError::NotSupported);
+ return Err(CreationError::OpenGlVersionNotSupported);
}
attributes.push(gl::wgl_extra::CONTEXT_MAJOR_VERSION_ARB as libc::c_int);
@@ -243,7 +243,7 @@ unsafe fn create_context(extra: Option<(&gl::wgl_extra::Wgl, &BuilderAttribs<'st
attributes.push(gl::wgl_extra::CONTEXT_MINOR_VERSION_ARB as libc::c_int);
attributes.push(minor as libc::c_int);
},
- GlRequest::Specific(_, _) => return Err(CreationError::NotSupported),
+ GlRequest::Specific(_, _) => return Err(CreationError::OpenGlVersionNotSupported),
GlRequest::GlThenGles { opengl_version: (major, minor), .. } => {
attributes.push(gl::wgl_extra::CONTEXT_MAJOR_VERSION_ARB as libc::c_int);
attributes.push(major as libc::c_int);
@@ -290,7 +290,7 @@ unsafe fn create_context(extra: Option<(&gl::wgl_extra::Wgl, &BuilderAttribs<'st
} else {
match builder.gl_robustness {
Robustness::RobustNoResetNotification | Robustness::RobustLoseContextOnReset => {
- return Err(CreationError::NotSupported);
+ return Err(CreationError::RobustnessNotSupported);
},
_ => ()
}
@@ -573,5 +573,5 @@ fn choose_dummy_pixel_format<I>(iter: I) -> Result<libc::c_int, CreationError>
}
}
- backup_id.ok_or(CreationError::NotSupported)
+ backup_id.ok_or(CreationError::OsError("No available pixel format".to_string()))
}