From dbaca24cde140052fb08fbe00924da4a528ea7cf Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Mon, 22 Jun 2015 17:58:32 +0200 Subject: Add with_robustness and handle robustness on all implementations --- src/api/osmesa/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/api/osmesa') diff --git a/src/api/osmesa/mod.rs b/src/api/osmesa/mod.rs index daaba52..db0a1e7 100644 --- a/src/api/osmesa/mod.rs +++ b/src/api/osmesa/mod.rs @@ -8,6 +8,7 @@ use ContextError; use CreationError; use GlContext; use PixelFormat; +use Robustness; use libc; use std::{mem, ptr}; use std::ffi::CString; @@ -38,6 +39,13 @@ impl OsMesaContext { let dimensions = builder.dimensions.unwrap(); + match builder.gl_robustness { + Robustness::RobustNoResetNotification | Robustness::RobustLoseContextOnReset => { + return Err(CreationError::NotSupported.into()); + }, + _ => () + } + Ok(OsMesaContext { width: dimensions.0, height: dimensions.1, -- cgit v1.2.3