aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/cocoa/headless.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/cocoa/headless.rs')
-rw-r--r--src/api/cocoa/headless.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/api/cocoa/headless.rs b/src/api/cocoa/headless.rs
index 75cca8d..7cd0f88 100644
--- a/src/api/cocoa/headless.rs
+++ b/src/api/cocoa/headless.rs
@@ -1,3 +1,4 @@
+use ContextError;
use CreationError;
use CreationError::OsError;
use BuilderAttribs;
@@ -61,7 +62,7 @@ impl HeadlessContext {
}
impl GlContext for HeadlessContext {
- unsafe fn make_current(&self) {
+ unsafe fn make_current(&self) -> Result<(), ContextError> {
self.context.makeCurrentContext();
gl::GenFramebuffersEXT(1, &mut framebuffer);
@@ -78,6 +79,8 @@ impl GlContext for HeadlessContext {
if status != gl::FRAMEBUFFER_COMPLETE_EXT {
panic!("Error while creating the framebuffer");
}
+
+ Ok(())
}
fn is_current(&self) -> bool {
@@ -96,7 +99,8 @@ impl GlContext for HeadlessContext {
symbol as *const libc::c_void
}
- fn swap_buffers(&self) {
+ fn swap_buffers(&self) -> Result<(), ContextError> {
+ Ok(())
}
fn get_api(&self) -> ::Api {