3D-Viewer: fixing z-fight issues

This commit is contained in:
Mario Luzeiro 2020-09-07 16:00:48 +01:00 committed by Jon Evans
parent e288218c4f
commit f0edbd088c
1 changed files with 2 additions and 2 deletions

View File

@ -515,7 +515,7 @@ void C3D_RENDER_OGL_LEGACY::setCopperMaterial()
void C3D_RENDER_OGL_LEGACY::setPlatedCopperAndDepthOffset( PCB_LAYER_ID aLayer_id )
{
glEnable( GL_POLYGON_OFFSET_FILL );
glPolygonOffset( -1.0f, -1.0f );
glPolygonOffset( 0.0f, -2.0f );
set_layer_material( aLayer_id );
}
@ -907,7 +907,7 @@ bool C3D_RENDER_OGL_LEGACY::Redraw(
// add a depth buffer offset, it will help to hide some artifacts
// on silkscreen where the SolderMask is removed
glEnable( GL_POLYGON_OFFSET_FILL );
glPolygonOffset( 0.0f, -1.0f );
glPolygonOffset( 0.0f, -2.0f );
if( m_camera.GetPos().z > 0 )
{