From 9b16e015f650acb8d05af55ff8f013ed388fcc30 Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Thu, 6 Jun 2024 22:33:55 +0300 Subject: [PATCH] Fix depth test issue in demo. --- Quik.OpenTK/OpenTKPort.cs | 2 +- Quik/OpenGL/GLEnum.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Quik.OpenTK/OpenTKPort.cs b/Quik.OpenTK/OpenTKPort.cs index f0206b1..c38dfe1 100644 --- a/Quik.OpenTK/OpenTKPort.cs +++ b/Quik.OpenTK/OpenTKPort.cs @@ -78,7 +78,7 @@ namespace Quik.OpenTK if (!_glDriver.IsInit) _glDriver.Init(); - GL.Clear(GLEnum.GL_COLOR_BUFFER_BIT); + GL.Clear(GLEnum.GL_COLOR_BUFFER_BIT | GLEnum.GL_DEPTH_BUFFER_BIT); _glDriver.Draw(_vertexEngine.DrawQueue, view); _window.Context.SwapBuffers(); diff --git a/Quik/OpenGL/GLEnum.cs b/Quik/OpenGL/GLEnum.cs index 89b5213..550fb0b 100644 --- a/Quik/OpenGL/GLEnum.cs +++ b/Quik/OpenGL/GLEnum.cs @@ -21,6 +21,7 @@ namespace Quik.OpenGL GL_BLEND = 0x0BE2, GL_COLOR_BUFFER_BIT = 0x00004000, + GL_DEPTH_BUFFER_BIT = 0x00000100, GL_SRC_ALPHA = 0x0302, GL_ONE_MINUS_SRC_ALPHA = 0x0303,