From 526edc6f4cb5f29d17e2fe384e316236c033fccd Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 25 May 2024 00:11:02 +0200 Subject: fix: enable multisampling with 8 samples --- src/main.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 1ec6d65..3c08f82 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,14 @@ use engine::renderer::opengl::Extension as OpenglRendererExtension; use engine::shader::Program as ShaderProgram; use engine::transform::Transform; use engine::vector::Vec3; -use engine::window::{CursorMode, Extension as WindowExtension, Window}; +use engine::window::{ + Builder as WindowBuilder, + CreationHint as WindowCreationHint, + CreationHintValue as WindowCreationHintValue, + CursorMode, + Extension as WindowExtension, + Window, +}; use engine::Engine; use tracing::Level; use tracing_subscriber::FmtSubscriber; @@ -99,9 +106,12 @@ fn main() -> Result<(), Box> engine.add_extension(OpenglRendererExtension::default()); engine.add_extension( - WindowExtension::default() - .window_title("Game") - .window_size(WINDOW_SIZE), + WindowExtension::new(WindowBuilder::default().creation_hint( + WindowCreationHint::Samples, + WindowCreationHintValue::Number(8), + )) + .window_title("Game") + .window_size(WINDOW_SIZE), ); engine.add_extension(FlyCameraExtension(FlyCameraOptions { -- cgit v1.2.3-18-g5258