diff options
| author | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-20 09:29:22 +0200 | 
|---|---|---|
| committer | Pierre Krieger <pierre.krieger1708@gmail.com> | 2015-09-21 12:03:55 +0200 | 
| commit | c244f8c033f100a6e0f3e0b2b408f6ddc1006d47 (patch) | |
| tree | 786cb96254b0fe69646700fc4845218c5703ffac /src/window.rs | |
| parent | f51ace4c7885fa25c146c24181c4d87f5632de3e (diff) | |
| download | glutin-c244f8c033f100a6e0f3e0b2b408f6ddc1006d47.tar.gz glutin-c244f8c033f100a6e0f3e0b2b408f6ddc1006d47.zip | |
Extract GlAttributes from BuilderAttribs
Diffstat (limited to 'src/window.rs')
| -rw-r--r-- | src/window.rs | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/src/window.rs b/src/window.rs index 00174d3..afca319 100644 --- a/src/window.rs +++ b/src/window.rs @@ -60,19 +60,19 @@ impl<'a> WindowBuilder<'a> {      ///      /// There are some exceptions, like FBOs or VAOs. See the OpenGL documentation.      pub fn with_shared_lists(mut self, other: &'a Window) -> WindowBuilder<'a> { -        self.attribs.sharing = Some(&other.window); +        self.attribs.opengl.sharing = Some(&other.window);          self      }      /// Sets how the backend should choose the OpenGL API and version.      pub fn with_gl(mut self, request: GlRequest) -> WindowBuilder<'a> { -        self.attribs.gl_version = request; +        self.attribs.opengl.version = request;          self      }      /// Sets the desired OpenGL context profile.      pub fn with_gl_profile(mut self, profile: GlProfile) -> WindowBuilder<'a> { -        self.attribs.gl_profile = Some(profile); +        self.attribs.opengl.profile = Some(profile);          self      } @@ -81,19 +81,19 @@ impl<'a> WindowBuilder<'a> {      /// The default value for this flag is `cfg!(debug_assertions)`, which means that it's enabled      /// when you run `cargo build` and disabled when you run `cargo build --release`.      pub fn with_gl_debug_flag(mut self, flag: bool) -> WindowBuilder<'a> { -        self.attribs.gl_debug = flag; +        self.attribs.opengl.debug = flag;          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.attribs.opengl.robustness = robustness;          self      }      /// Requests that the window has vsync enabled.      pub fn with_vsync(mut self) -> WindowBuilder<'a> { -        self.attribs.vsync = true; +        self.attribs.opengl.vsync = true;          self      } | 
