From e8fabb58a66b6675f3e8bcfeef1f85f96e7cab3b Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Sun, 31 Dec 2023 14:09:28 +0500 Subject: [PATCH] Fix bitmap Z order in OpenGL GAL. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16482 --- common/gal/opengl/opengl_gal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index e1e309a123..7cdfc20555 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1490,7 +1490,7 @@ void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend ) if( !glIsTexture( texture_id ) ) // ensure the bitmap texture is still valid return; - glDisable( GL_DEPTH_TEST ); + glDepthFunc( GL_ALWAYS ); glMatrixMode( GL_TEXTURE ); glPushMatrix(); @@ -1538,7 +1538,7 @@ void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend ) glPopMatrix(); glMatrixMode( GL_MODELVIEW ); - glEnable( GL_DEPTH_TEST ); + glDepthFunc( GL_LESS ); }