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
|
|
@ -12,6 +12,7 @@ use GlProfile;
|
|||
use GlRequest;
|
||||
use MouseCursor;
|
||||
use PixelFormat;
|
||||
use Robustness;
|
||||
use native_monitor::NativeMonitorId;
|
||||
|
||||
use gl_common;
|
||||
|
|
@ -84,6 +85,12 @@ impl<'a> WindowBuilder<'a> {
|
|||
self
|
||||
}
|
||||
|
||||
/// Sets the robustness of the OpenGL context. See the docs of `Robustness`.
|
||||
pub fn with_gl_robustness(mut self, robustness: Robustness) -> WindowBuilder<'a> {
|
||||
self.attribs.gl_robustness = robustness;
|
||||
self
|
||||
}
|
||||
|
||||
/// Requests that the window has vsync enabled.
|
||||
pub fn with_vsync(mut self) -> WindowBuilder<'a> {
|
||||
self.attribs.vsync = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue