Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Apr 30, 2024
1 parent 04a6fe2 commit 3613c9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions glutin-winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use winit::window::{Window, WindowAttributes};
#[cfg(glx_backend)]
use winit::platform::x11::register_xlib_error_hook;
#[cfg(x11_platform)]
use winit::platform::x11::WindowBuilderExtX11;
use winit::platform::x11::WindowAttributesExtX11;

#[cfg(all(not(egl_backend), not(glx_backend), not(wgl_backend), not(cgl_backend)))]
compile_error!("Please select at least one api backend");
Expand Down Expand Up @@ -74,16 +74,16 @@ impl DisplayBuilder {
}

/// Initialize the OpenGL platform and create a compatible window to use
/// with it when the [`WindowBuilder`] was passed with
/// with it when the [`WindowAttributes`] was passed with
/// [`Self::with_window_attributes`]. It's optional, since on some
/// platforms like `Android` it is not available early on, so you want to
/// find configuration and later use it with the [`finalize_window`].
/// But if you don't care about such platform you can always pass
/// [`WindowBuilder`].
/// [`WindowAttributes`].
///
/// # Api-specific
///
/// **WGL:** - [`WindowBuilder`] **must** be passed in
/// **WGL:** - [`WindowAttributes`] **must** be passed in
/// [`Self::with_window_attributes`] if modern OpenGL(ES) is desired,
/// otherwise only builtin functions like `glClear` will be available.
pub fn build<Picker>(
Expand Down
4 changes: 2 additions & 2 deletions glutin_examples/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl ApplicationHandler<()> for Application {
let display_builder = DisplayBuilder::new().with_window_attributes(window_attributes);

let (window, gl_config) = display_builder
.build(&active_event_loop, template, gl_config_picker)
.build(active_event_loop, template, gl_config_picker)
.expect("Failed to create Window.");

println!("Picked a config with {} samples", gl_config.num_samples());
Expand Down Expand Up @@ -125,7 +125,7 @@ impl ApplicationHandler<()> for Application {

let attrs = window.build_surface_attributes(Default::default());
let gl_surface =
unsafe { gl_config.display().create_window_surface(&gl_config, &attrs).unwrap() };
unsafe { gl_config.display().create_window_surface(gl_config, &attrs).unwrap() };

// Make it current.
let gl_context =
Expand Down

0 comments on commit 3613c9e

Please sign in to comment.