[gtk/wip/otte/win32-cleanup] gl: Disable depth test
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/win32-cleanup] gl: Disable depth test
- Date: Thu, 29 Jul 2021 04:23:28 +0000 (UTC)
commit 7e1e713a096d30501fab3ffbb8aeae3b78302f2b
Author: Benjamin Otte <otte redhat com>
Date: Thu Jul 29 06:23:02 2021 +0200
gl: Disable depth test
Usually, the GdkGLContext will have the depth buffer disabled, so the
depth test will not work. However, if the GDK backend does not provide a
config without depth buffer, there will be one.
And if we enable it, it'll do the wrong thing.
For example, it'll paint the wrong thing in the cube flip animation of
GtkStack (like on widget-factory page 2).
gsk/gl/gskglrenderer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index a801f55ab3..cb7a633977 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -4289,8 +4289,7 @@ gsk_gl_renderer_do_render (GskRenderer *renderer,
gsk_gl_renderer_setup_render_mode (self);
gsk_gl_renderer_clear (self);
- glEnable (GL_DEPTH_TEST);
- glDepthFunc (GL_LEQUAL);
+ glDisable (GL_DEPTH_TEST);
/* Pre-multiplied alpha! */
glEnable (GL_BLEND);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]