From 5e8b23af64165cb5f29b0e90d2cc86b8d2197a15 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 2 Sep 2021 18:19:18 +0200 Subject: [PATCH] 3D viewer: add missing initialization of the line width of the grid. Fixes #9082 https://gitlab.com/kicad/code/kicad/issues/9082 --- 3d-viewer/3d_rendering/legacy/render_3d_legacy.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3d-viewer/3d_rendering/legacy/render_3d_legacy.cpp b/3d-viewer/3d_rendering/legacy/render_3d_legacy.cpp index 634c6a6991..4758457c85 100644 --- a/3d-viewer/3d_rendering/legacy/render_3d_legacy.cpp +++ b/3d-viewer/3d_rendering/legacy/render_3d_legacy.cpp @@ -1371,7 +1371,7 @@ void RENDER_3D_LEGACY::generate3dGrid( GRID3D_TYPE aGridType ) const SFVEC3F gridColor = m_boardAdapter.GetColor( DARKGRAY ); // Color of grid lines every 5 lines - const SFVEC3F gridColor_marker = m_boardAdapter.GetColor( LIGHTGRAY ); + const SFVEC3F gridColor_marker = m_boardAdapter.GetColor( LIGHTBLUE ); const double scale = m_boardAdapter.BiuTo3dUnits(); const GLfloat transparency = 0.35f; @@ -1414,6 +1414,9 @@ void RENDER_3D_LEGACY::generate3dGrid( GRID3D_TYPE aGridType ) double zmin = Millimeter2iu( -50 ) * scale; double zmax = Millimeter2iu( 100 ) * scale; + // Set rasterised line width (min value = 1) + glLineWidth( 1 ); + // Draw horizontal grid centered on 3D origin (center of the board) for( int ii = 0; ; ii++ ) {