From cf5418780bd61650d1dc7a0c752535dda90f21d3 Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Sun, 6 Aug 2023 13:09:21 +0200 Subject: [PATCH] chore: move depth test setting to gfx init --- src/hello.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hello.cpp b/src/hello.cpp index 9ea7e48..fcaa096 100644 --- a/src/hello.cpp +++ b/src/hello.cpp @@ -86,6 +86,8 @@ int initGraphics(GLFWwindow** window) return -1; } + glEnable(GL_DEPTH_TEST); + return 0; } @@ -155,8 +157,6 @@ int main() Icosphere sphere(0.5, 2); Orbit orbit(30, glm::vec3(.5, .5, 0)); - glEnable(GL_DEPTH_TEST); - // Main loop while (!glfwWindowShouldClose(window)) {