Support transparent cursor colors in OpenGL GAL.

This commit is contained in:
Alex Shvartzkop 2023-11-29 04:04:19 +03:00
parent bbba7fd4d7
commit afa08b710c
1 changed files with 4 additions and 2 deletions

View File

@ -2590,11 +2590,13 @@ void OPENGL_GAL::blitCursor()
VECTOR2D cursorEnd = m_cursorPosition + cursorSize / ( 2 * m_worldScale );
VECTOR2D cursorCenter = ( cursorBegin + cursorEnd ) / 2;
const COLOR4D cColor = getCursorColor();
const COLOR4D color( cColor.r * cColor.a, cColor.g * cColor.a, cColor.b * cColor.a, 1.0 );
const COLOR4D color = getCursorColor();
glActiveTexture( GL_TEXTURE0 );
glDisable( GL_TEXTURE_2D );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
glLineWidth( 1.0 );
glColor4d( color.r, color.g, color.b, color.a );