disabling depth buffer for 2d
This commit is contained in:
parent
44f5325f4e
commit
e4d090dbd9
|
@ -145,7 +145,6 @@ public class Window extends BaseWindow {
|
|||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glEnable(GL_BLEND);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
//glDepthFunc(GL_GREATER);
|
||||
|
||||
glfwSetWindowSizeCallback(window, this::windowSizeCallback);
|
||||
glfwSetMouseButtonCallback(window, this::mouseButtonCallback);
|
||||
|
@ -349,6 +348,7 @@ public class Window extends BaseWindow {
|
|||
textureAtlas.update();
|
||||
glClearColor(0.f, 0.f, 0.f, 0.0f);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glDepthFunc(GL_ALWAYS);
|
||||
//glBegin(GL_TRIANGLES);
|
||||
return renderContext;
|
||||
}
|
||||
|
@ -360,8 +360,9 @@ public class Window extends BaseWindow {
|
|||
glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
|
||||
glViewport(0, 0, size.getX(), size.getY());
|
||||
textureAtlas.update();
|
||||
glClearColor(0.f, 1.f, 0.f, 1.0f);
|
||||
glClearColor(0.f, 0.f, 0.f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
glDepthFunc(GL_LESS);
|
||||
//glBegin(GL_TRIANGLES);
|
||||
glUniformMatrix4fv(program3D.getUniformLocation("projection"),
|
||||
true,
|
||||
|
|
Loading…
Reference in New Issue