Add with_robustness and handle robustness on all implementations
This commit is contained in:
parent
1aedc828c5
commit
dbaca24cde
9 changed files with 216 additions and 36 deletions
|
|
@ -5,6 +5,7 @@ use CreationError;
|
|||
use GlRequest;
|
||||
use GlContext;
|
||||
use PixelFormat;
|
||||
use Robustness;
|
||||
|
||||
use gl_common;
|
||||
use libc;
|
||||
|
|
@ -43,6 +44,12 @@ impl HeadlessRendererBuilder {
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets the robustness of the OpenGL context. See the docs of `Robustness`.
|
||||
pub fn with_gl_robustness(mut self, robustness: Robustness) -> HeadlessRendererBuilder {
|
||||
self.attribs.gl_robustness = robustness;
|
||||
self
|
||||
}
|
||||
|
||||
/// Builds the headless context.
|
||||
///
|
||||
/// Error should be very rare and only occur in case of permission denied, incompatible system,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue