[grits] Fix depth buffer glitches
- From: Andy Spencer <andys src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grits] Fix depth buffer glitches
- Date: Sat, 2 Jun 2012 22:27:08 +0000 (UTC)
commit 0b8cdeb4cdbbd3138d53eec7efa8635ea5fdb3fd
Author: Andy Spencer <andy753421 gmail com>
Date: Wed May 23 04:37:58 2012 +0000
Fix depth buffer glitches
src/grits-opengl.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/grits-opengl.c b/src/grits-opengl.c
index 1aec412..a2dce84 100644
--- a/src/grits-opengl.c
+++ b/src/grits-opengl.c
@@ -307,11 +307,9 @@ static void _draw_level(gpointer _level, gpointer _opengl)
/* Enable depth and alpha for world levels */
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.1);
- glDepthMask(TRUE);
} else {
/* Disable depth for Overlay/HUD levels */
- // This causes rendering glitches not sure why..
- //glDepthMask(FALSE);
+ glDepthMask(FALSE);
}
/* Start ortho */
@@ -341,6 +339,9 @@ static void _draw_level(gpointer _level, gpointer _opengl)
glMatrixMode(GL_MODELVIEW); glPopMatrix();
}
+ /* Leave depth buffer write enabled */
+ glDepthMask(TRUE);
+
/* TODO: Prune empty levels */
g_debug("GritsOpenGL: _draw_level - drew %d,%d objects",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]