Implement Backface Culling

This commit is contained in:
Sebastian 2023-08-11 20:09:20 +02:00
parent ce75297105
commit bf2b169563

View File

@ -20,6 +20,8 @@ public class Renderer {
private Matrix4f projectionMatrix; private Matrix4f projectionMatrix;
public Renderer(StaticShader shader) { public Renderer(StaticShader shader) {
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glCullFace(GL11.GL_BACK);
createProjectionMatrix(); createProjectionMatrix();
shader.start(); shader.start();
shader.loadProjectionMatrix(projectionMatrix); shader.loadProjectionMatrix(projectionMatrix);