diff options
author | HampusM <hampus@hampusmat.com> | 2024-05-25 00:11:02 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-05-25 00:11:02 +0200 |
commit | 526edc6f4cb5f29d17e2fe384e316236c033fccd (patch) | |
tree | 08446f0e2977549920b142d9d88adb8a64fe0fa9 /src | |
parent | 0f968b0812ecfd09395bfef5c2cab3663b61c387 (diff) |
fix: enable multisampling with 8 samples
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 18 |
1 files changed, 14 insertions, 4 deletions
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<dyn Error>> 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 { |