From 1a36454a8decdab356c3312bdccd04ac8190b9c5 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sat, 18 Dec 2021 22:42:32 -0600 Subject: [PATCH] color cubes and vsync --- src/main.onyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.onyx b/src/main.onyx index 37ba4f4..b3146b0 100644 --- a/src/main.onyx +++ b/src/main.onyx @@ -14,7 +14,7 @@ create_window :: () => { window = glfwCreateWindow(1200, 720, #cstr "Voxel Shooter"); glfwMakeContextCurrent(window); - glfwSwapInterval(0); + glfwSwapInterval(1); glfwSetWindowSizeCallback(window, "on_resize"); glfwSetKeyCallback(window, "on_key"); } @@ -124,7 +124,7 @@ setup_opengl :: () { } for z: 32 do for x: 32 { if random.between(0, 10) >= 7 do continue; - chunk_set(chunk, x, 1, z, block_make(0.6, 0.6, 0.6, 0.8)); + chunk_set(chunk, x, 1, z, block_make(random.float(0, 1), random.float(0, 1), random.float(0, 1), 1)); } chunk.mesh = chunk_build_mesh(chunk); -- 2.25.1