enable face culling

This commit is contained in:
2025-04-26 17:26:27 +02:00
parent f8ae19fee8
commit 65c904478f
2 changed files with 6 additions and 2 deletions

View File

@@ -68,8 +68,8 @@ public class BoardModelLoader {
int[] indices = new int[BOARD_SIZE * 6];
for (int i = 0; i < BOARD_SIZE; i++) {
indices[i * 6] = i * 4;
indices[i * 6 + 1] = i * 4 + 1;
indices[i * 6 + 2] = i * 4 + 2;
indices[i * 6 + 1] = i * 4 + 2;
indices[i * 6 + 2] = i * 4 + 1;
indices[i * 6 + 3] = i * 4 + 1;
indices[i * 6 + 4] = i * 4 + 2;
indices[i * 6 + 5] = i * 4 + 3;

View File

@@ -143,6 +143,10 @@ public class Window {
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
glCullFace(GL_FRONT);
glFrontFace(GL_CW);
glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
// Run the rendering loop until the user has attempted to close