diff --git a/src/client/client_imgui.cpp b/src/client/client_imgui.cpp index 9851409..a8b4be0 100644 --- a/src/client/client_imgui.cpp +++ b/src/client/client_imgui.cpp @@ -82,6 +82,8 @@ int main(int argc, char** argv) ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); float fov = 45.0; + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LESS); // Required before OpenGL Calls. GLuint vertex_array; glGenVertexArrays(1, &vertex_array); @@ -164,7 +166,7 @@ int main(int argc, char** argv) // Clear GL buffers glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w); - glClear(GL_COLOR_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Render game geometries glfwGetWindowSize(window, &window_width, &window_height);