diff --git a/src/main/java/com/shc/silenceengine/graphics/GraphicsEngine.java b/src/main/java/com/shc/silenceengine/graphics/GraphicsEngine.java index 9976e540..6075c00f 100644 --- a/src/main/java/com/shc/silenceengine/graphics/GraphicsEngine.java +++ b/src/main/java/com/shc/silenceengine/graphics/GraphicsEngine.java @@ -97,7 +97,6 @@ public void init() GL3Context.enable(GL_BLEND); GL3Context.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - GL3Context.cullFace(GL_FRONT_AND_BACK); GL3Context.viewport(0, 0, Display.getWidth(), Display.getHeight()); setClearColor(clearColor); diff --git a/src/main/java/com/shc/silenceengine/graphics/models/ModelBuilder.java b/src/main/java/com/shc/silenceengine/graphics/models/ModelBuilder.java index bb7e2d84..be8f45ec 100644 --- a/src/main/java/com/shc/silenceengine/graphics/models/ModelBuilder.java +++ b/src/main/java/com/shc/silenceengine/graphics/models/ModelBuilder.java @@ -73,12 +73,12 @@ public ModelBuilder createBox(float width, float height, float thickness) { // Front faces of the box emitVertex(new Vector3(-width / 2, +height / 2, +thickness / 2), new Vector3(0, 0, 1), new Vector2(0, 0)); - emitVertex(new Vector3(+width / 2, +height / 2, +thickness / 2), new Vector3(0, 0, 1), new Vector2(1, 0)); emitVertex(new Vector3(-width / 2, -height / 2, +thickness / 2), new Vector3(0, 0, 1), new Vector2(0, 1)); + emitVertex(new Vector3(+width / 2, +height / 2, +thickness / 2), new Vector3(0, 0, 1), new Vector2(1, 0)); emitFace(); emitVertex(new Vector3(+width / 2, +height / 2, +thickness / 2), new Vector3(0, 0, 1), new Vector2(1, 0)); - emitVertex(new Vector3(+width / 2, -height / 2, +thickness / 2), new Vector3(0, 0, 1), new Vector2(1, 1)); emitVertex(new Vector3(-width / 2, -height / 2, +thickness / 2), new Vector3(0, 0, 1), new Vector2(0, 1)); + emitVertex(new Vector3(+width / 2, -height / 2, +thickness / 2), new Vector3(0, 0, 1), new Vector2(1, 1)); emitFace(); // Back faces of the box @@ -93,12 +93,12 @@ public ModelBuilder createBox(float width, float height, float thickness) // Left faces of the box emitVertex(new Vector3(-width / 2, +height / 2, -thickness / 2), new Vector3(-1, 0, 0), new Vector2(0, 0)); - emitVertex(new Vector3(-width / 2, +height / 2, +thickness / 2), new Vector3(-1, 0, 0), new Vector2(1, 0)); emitVertex(new Vector3(-width / 2, -height / 2, -thickness / 2), new Vector3(-1, 0, 0), new Vector2(0, 1)); + emitVertex(new Vector3(-width / 2, +height / 2, +thickness / 2), new Vector3(-1, 0, 0), new Vector2(1, 0)); emitFace(); emitVertex(new Vector3(-width / 2, +height / 2, +thickness / 2), new Vector3(-1, 0, 0), new Vector2(1, 0)); - emitVertex(new Vector3(-width / 2, -height / 2, +thickness / 2), new Vector3(-1, 0, 0), new Vector2(1, 1)); emitVertex(new Vector3(-width / 2, -height / 2, -thickness / 2), new Vector3(-1, 0, 0), new Vector2(0, 1)); + emitVertex(new Vector3(-width / 2, -height / 2, +thickness / 2), new Vector3(-1, 0, 0), new Vector2(1, 1)); emitFace(); // Right faces of the box @@ -113,12 +113,12 @@ public ModelBuilder createBox(float width, float height, float thickness) // Top faces of the box emitVertex(new Vector3(-width / 2, +height / 2, -thickness / 2), new Vector3(0, 1, 0), new Vector2(0, 0)); - emitVertex(new Vector3(+width / 2, +height / 2, -thickness / 2), new Vector3(0, 1, 0), new Vector2(1, 0)); emitVertex(new Vector3(-width / 2, +height / 2, +thickness / 2), new Vector3(0, 1, 0), new Vector2(0, 1)); + emitVertex(new Vector3(+width / 2, +height / 2, -thickness / 2), new Vector3(0, 1, 0), new Vector2(1, 0)); emitFace(); emitVertex(new Vector3(+width / 2, +height / 2, -thickness / 2), new Vector3(0, 1, 0), new Vector2(1, 0)); - emitVertex(new Vector3(+width / 2, +height / 2, +thickness / 2), new Vector3(0, 1, 0), new Vector2(1, 1)); emitVertex(new Vector3(-width / 2, +height / 2, +thickness / 2), new Vector3(0, 1, 0), new Vector2(0, 1)); + emitVertex(new Vector3(+width / 2, +height / 2, +thickness / 2), new Vector3(0, 1, 0), new Vector2(1, 1)); emitFace(); // Bottom faces of the box