GAL, Opengl: Draw Arc: fix draw layer depth (previously, set to 0.0, which is not always the case)

This commit is contained in:
jean-pierre charras 2018-10-21 19:53:36 +02:00
parent 0f247264f8
commit f183b4f526
1 changed files with 6 additions and 6 deletions

View File

@ -664,19 +664,19 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a
for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; )
{ {
currentManager->Reserve( 3 ); currentManager->Reserve( 3 );
currentManager->Vertex( 0.0, 0.0, 0.0 ); currentManager->Vertex( 0.0, 0.0, layerDepth );
currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, 0.0 ); currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, layerDepth );
alpha += alphaIncrement; alpha += alphaIncrement;
currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, 0.0 ); currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, layerDepth );
} }
// The last missing triangle // The last missing triangle
const VECTOR2D endPoint( cos( aEndAngle ) * aRadius, sin( aEndAngle ) * aRadius ); const VECTOR2D endPoint( cos( aEndAngle ) * aRadius, sin( aEndAngle ) * aRadius );
currentManager->Reserve( 3 ); currentManager->Reserve( 3 );
currentManager->Vertex( 0.0, 0.0, 0.0 ); currentManager->Vertex( 0.0, 0.0, layerDepth );
currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, 0.0 ); currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, layerDepth );
currentManager->Vertex( endPoint.x, endPoint.y, 0.0 ); currentManager->Vertex( endPoint.x, endPoint.y, layerDepth );
} }
if( isStrokeEnabled ) if( isStrokeEnabled )