This commit is contained in:
Antoine 2021-05-17 19:05:45 +02:00
parent 5f4b2aa56e
commit 2aa23512be

View File

@ -60,6 +60,7 @@ public class Engine {
glfwSetFramebufferSizeCallback(window, resizeWindow);
glEnable(GL_DEPTH_TEST); // Z-Buffer
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
System.out.println("OpenGL: " + glGetString(GL_VERSION));
@ -73,7 +74,7 @@ public class Engine {
private void render(){
glClearColor(0.2f, 0.3f, 0.3f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT); //SWAP avec le precedent
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //SWAP avec le precedent
scene.render();
int error = glGetError();
if (error != GL_NO_ERROR) System.out.println(error);