Browse Source

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
master
Addo White 2 months ago
committed by Seth Hillbrand
parent
commit
843eea259d
  1. 6
      common/gal/opengl/opengl_gal.cpp

6
common/gal/opengl/opengl_gal.cpp

@ -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…
Cancel
Save