Fix bitmap Z order in OpenGL GAL.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16482
This commit is contained in:
Alex Shvartzkop 2023-12-31 14:09:28 +05:00
parent 55429aea6b
commit e8fabb58a6
1 changed files with 2 additions and 2 deletions

View File

@ -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 );
}