From 2bf3383624d1dfcd2d7e8fe3e76a9dc61bb76578 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Thu, 9 Feb 2012 20:45:19 +0000 Subject: [PATCH] Attempt to fix minimap rendering issues This was SVN commit r11041. --- source/gui/MiniMap.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/gui/MiniMap.cpp b/source/gui/MiniMap.cpp index 48ebf56bfd..38f6223e99 100644 --- a/source/gui/MiniMap.cpp +++ b/source/gui/MiniMap.cpp @@ -314,6 +314,10 @@ void CMiniMap::Draw() CMatrix3D matrix = GetDefaultGuiMatrix(); glLoadMatrixf(&matrix._11); + // Disable depth updates to prevent apparent z-fighting-related issues + // with some drivers causing units to get drawn behind the texture + glDepthMask(0); + const float x = m_CachedActualSize.left, y = m_CachedActualSize.bottom; const float x2 = m_CachedActualSize.right, y2 = m_CachedActualSize.top; const float z = GetBufferedZ(); @@ -441,6 +445,7 @@ void CMiniMap::Draw() // Reset everything back to normal glPointSize(1.0f); glEnable(GL_TEXTURE_2D); + glDepthMask(1); } #endif // CONFIG2_GLES