fix for backface culling

This commit is contained in:
Luca Conte 2025-04-20 02:29:31 +02:00
parent 1a84ed5ab6
commit b798a9a26e
1 changed files with 7 additions and 7 deletions

View File

@ -159,22 +159,22 @@ void init(void) {
glPrimitiveRestartIndex(restart); glPrimitiveRestartIndex(restart);
GLuint indices[] = { GLuint indices[] = {
0, 1, 2, 1, 0, 2,
1, 2, 3, 1, 2, 3,
0, 4, 1, 4, 0, 1,
5, 4, 1, 5, 4, 1,
5, 1, 7, 5, 1, 7,
3, 1, 7, 1, 3, 7,
7, 5, 6, 5, 7, 6,
4, 5, 6, 4, 5, 6,
4, 0, 6, 0, 4, 6,
2, 0, 6, 2, 0, 6,
2, 3, 6, 3, 2, 6,
7, 3, 6 7, 3, 6
}; };
@ -214,7 +214,7 @@ void init(void) {
glClearColor(0.0f, 0.0f, 0.0f, 0.3f); glClearColor(0.0f, 0.0f, 0.0f, 0.3f);
glViewport(0, 0, initialWindowWidth, initialWindowHeight); glViewport(0, 0, initialWindowWidth, initialWindowHeight);
// glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);
glFrontFace(GL_CCW); glFrontFace(GL_CCW);
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);