From b798a9a26e3af3e4ff927262d4d50f6170387f1c Mon Sep 17 00:00:00 2001 From: Luca Conte Date: Sun, 20 Apr 2025 02:29:31 +0200 Subject: [PATCH] fix for backface culling --- src/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.c b/src/main.c index 478e238..377c46b 100644 --- a/src/main.c +++ b/src/main.c @@ -159,22 +159,22 @@ void init(void) { glPrimitiveRestartIndex(restart); GLuint indices[] = { - 0, 1, 2, + 1, 0, 2, 1, 2, 3, - 0, 4, 1, + 4, 0, 1, 5, 4, 1, 5, 1, 7, - 3, 1, 7, + 1, 3, 7, - 7, 5, 6, + 5, 7, 6, 4, 5, 6, - 4, 0, 6, + 0, 4, 6, 2, 0, 6, - 2, 3, 6, + 3, 2, 6, 7, 3, 6 }; @@ -214,7 +214,7 @@ void init(void) { glClearColor(0.0f, 0.0f, 0.0f, 0.3f); glViewport(0, 0, initialWindowWidth, initialWindowHeight); - // glEnable(GL_CULL_FACE); + glEnable(GL_CULL_FACE); glFrontFace(GL_CCW); glEnable(GL_DEPTH_TEST);