enable face culling
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user