From f183b4f52697646e1512f3053550add82438f19a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 21 Oct 2018 19:53:36 +0200 Subject: [PATCH] GAL, Opengl: Draw Arc: fix draw layer depth (previously, set to 0.0, which is not always the case) --- common/gal/opengl/opengl_gal.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index f68884d57c..8a93a6e6f7 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -664,19 +664,19 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) { currentManager->Reserve( 3 ); - currentManager->Vertex( 0.0, 0.0, 0.0 ); - currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, 0.0 ); + currentManager->Vertex( 0.0, 0.0, layerDepth ); + currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, layerDepth ); 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 const VECTOR2D endPoint( cos( aEndAngle ) * aRadius, sin( aEndAngle ) * aRadius ); currentManager->Reserve( 3 ); - currentManager->Vertex( 0.0, 0.0, 0.0 ); - currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, 0.0 ); - currentManager->Vertex( endPoint.x, endPoint.y, 0.0 ); + currentManager->Vertex( 0.0, 0.0, layerDepth ); + currentManager->Vertex( cos( alpha ) * aRadius, sin( alpha ) * aRadius, layerDepth ); + currentManager->Vertex( endPoint.x, endPoint.y, layerDepth ); } if( isStrokeEnabled )