Fix overlapping transparent images covering each other in OpenGL GAL.

This commit is contained in:
Alex Shvartzkop 2023-07-02 08:42:59 +03:00
parent f286015bc7
commit 4cb7e92aad
1 changed files with 4 additions and 0 deletions

View File

@ -1420,6 +1420,8 @@ void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend )
if( !glIsTexture( texture_id ) ) // ensure the bitmap texture is still valid if( !glIsTexture( texture_id ) ) // ensure the bitmap texture is still valid
return; return;
glDisable( GL_DEPTH_TEST );
glMatrixMode( GL_TEXTURE ); glMatrixMode( GL_TEXTURE );
glPushMatrix(); glPushMatrix();
glTranslated( 0.5, 0.5, 0.5 ); glTranslated( 0.5, 0.5, 0.5 );
@ -1465,6 +1467,8 @@ void OPENGL_GAL::DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend )
glMatrixMode( GL_TEXTURE ); glMatrixMode( GL_TEXTURE );
glPopMatrix(); glPopMatrix();
glMatrixMode( GL_MODELVIEW ); glMatrixMode( GL_MODELVIEW );
glEnable( GL_DEPTH_TEST );
} }