From 672d77ad81318005999bef7c0280c3d9f7940f90 Mon Sep 17 00:00:00 2001 From: IllusionMan1212 Date: Thu, 21 Dec 2023 22:36:52 +0200 Subject: [PATCH] fix: opengl hints --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6b23f84..873616a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,9 +64,9 @@ fn main() -> anyhow::Result<(), Box> { let mut glfw = glfw::init(glfw::FAIL_ON_ERRORS)?; - glfw::WindowHint::ContextVersion(3, 3); - glfw::WindowHint::OpenGlProfile(glfw::OpenGlProfileHint::Core); - glfw::WindowHint::OpenGlForwardCompat(true); + glfw.window_hint(glfw::WindowHint::ContextVersion(3, 3)); + glfw.window_hint(glfw::WindowHint::OpenGlProfile(glfw::OpenGlProfileHint::Core)); + glfw.window_hint(glfw::WindowHint::OpenGlForwardCompat(true)); let (mut window, events) = glfw .create_window(1200, 800, "3dobs", glfw::WindowMode::Windowed) @@ -161,7 +161,7 @@ fn main() -> anyhow::Result<(), Box> { mesh_shader.set_float("spotLight.quadratic", 0.032); mesh_shader.set_3fv("dirLight.direction", glm::vec3(-0.2, -1.0, -0.3)); - mesh_shader.set_3fv("dirLight.ambient", glm::vec3(0.1, 0.1, 0.1)); + mesh_shader.set_3fv("dirLight.ambient", glm::vec3(0.3, 0.3, 0.3)); mesh_shader.set_3fv("dirLight.diffuse", glm::vec3(1.0, 1.0, 1.0)); mesh_shader.set_3fv("dirLight.specular", glm::vec3(1.0, 1.0, 1.0));