3D viewer: add missing initialization of the line width of the grid.

Fixes #9082
https://gitlab.com/kicad/code/kicad/issues/9082
This commit is contained in:
jean-pierre charras 2021-09-02 18:19:18 +02:00
parent 7e2abf545b
commit 5e8b23af64
1 changed files with 4 additions and 1 deletions

View File

@ -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++ )
{