mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Fix for Cursor rendering on Linux+EGL+Nvidia in accelerated graphics mode
EGL/NVidia can sometimes clip the cursor based on its plane regardless of the depth mask. This avoids the issue by forcing the cursor up over the existing plane. Fixes https://gitlab.com/kicad/code/kicad/-/issues/12183
This commit is contained in:
parent
cc9ec7c01c
commit
843eea259d
@ -2700,6 +2700,10 @@ void OPENGL_GAL::blitCursor()
|
||||
glLineWidth( 1.0 );
|
||||
glColor4d( color.r, color.g, color.b, color.a );
|
||||
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glPushMatrix();
|
||||
glTranslated( 0, 0, -0.5 );
|
||||
|
||||
glBegin( GL_LINES );
|
||||
|
||||
if( m_crossHairMode == CROSS_HAIR_MODE::FULLSCREEN_DIAGONAL )
|
||||
@ -2743,6 +2747,8 @@ void OPENGL_GAL::blitCursor()
|
||||
|
||||
glEnd();
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
if( depthTestEnabled )
|
||||
glEnable( GL_DEPTH_TEST );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user