diff options
author | HampusM <hampus@hampusmat.com> | 2023-10-14 14:56:37 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-10-14 14:56:37 +0200 |
commit | 1a678d877c5a0f5faf95741d27390c923c8dd2b4 (patch) | |
tree | 90e26ba6f19a84eab540be05acc3418f7b645b76 /engine/src/lib.rs | |
parent | 2596f7e6192d53458da2305a03e2b31546eb198c (diff) |
chore(engine): use window builder
Diffstat (limited to 'engine/src/lib.rs')
-rw-r--r-- | engine/src/lib.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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<Self, Error> { - let window = Window::create(window_size, window_title) + let window = WindowBuilder::new() + .create(window_size, window_title) .map_err(Error::CreateWindowFailed)?; window |