From 1a678d877c5a0f5faf95741d27390c923c8dd2b4 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 14 Oct 2023 14:56:37 +0200 Subject: chore(engine): use window builder --- engine/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engine/src/lib.rs') diff --git a/engine/src/lib.rs b/engine/src/lib.rs index e036c38..407df32 100644 --- a/engine/src/lib.rs +++ b/engine/src/lib.rs @@ -1,7 +1,6 @@ #![deny(clippy::all, clippy::pedantic)] -use glfw::Window; -pub use glfw::WindowSize; +use glfw::{Window, WindowBuilder}; use crate::object::Object; use crate::vector::Vec2; @@ -14,6 +13,8 @@ pub mod object; pub mod vector; pub mod vertex; +pub use glfw::WindowSize; + #[derive(Debug)] pub struct Engine { @@ -28,7 +29,8 @@ impl Engine /// Will return `Err` if window creation or window configuration fails. pub fn new(window_size: &WindowSize, window_title: &str) -> Result { - let window = Window::create(window_size, window_title) + let window = WindowBuilder::new() + .create(window_size, window_title) .map_err(Error::CreateWindowFailed)?; window -- cgit v1.2.3-18-g5258