bugfix: OPENGL_GAL::drawPolygon did not respect fill settings
The OPENGL_GAL::drawPolygon function and all functions using it did not respect the isFillEnabled member set by GAL::SetIsFill. This is fixed by this patch.
This commit is contained in:
parent
084eea6781
commit
5572183c22
|
@ -1511,6 +1511,8 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa
|
||||||
|
|
||||||
void OPENGL_GAL::drawPolygon( GLdouble* aPoints, int aPointCount )
|
void OPENGL_GAL::drawPolygon( GLdouble* aPoints, int aPointCount )
|
||||||
{
|
{
|
||||||
|
if( isFillEnabled )
|
||||||
|
{
|
||||||
currentManager->Shader( SHADER_NONE );
|
currentManager->Shader( SHADER_NONE );
|
||||||
currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a );
|
currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a );
|
||||||
|
|
||||||
|
@ -1533,10 +1535,13 @@ void OPENGL_GAL::drawPolygon( GLdouble* aPoints, int aPointCount )
|
||||||
|
|
||||||
// Free allocated intersecting points
|
// Free allocated intersecting points
|
||||||
tessIntersects.clear();
|
tessIntersects.clear();
|
||||||
|
}
|
||||||
|
|
||||||
if( isStrokeEnabled )
|
if( isStrokeEnabled )
|
||||||
|
{
|
||||||
drawPolyline( [&](int idx) { return VECTOR2D( aPoints[idx * 3], aPoints[idx * 3 + 1] ); },
|
drawPolyline( [&](int idx) { return VECTOR2D( aPoints[idx * 3], aPoints[idx * 3 + 1] ); },
|
||||||
aPointCount );
|
aPointCount );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue