Skip to content

Commit

Permalink
Make tessellator properly handle 2d triangles (fix #36024)
Browse files Browse the repository at this point in the history
(cherry picked from commit 800c54f)
  • Loading branch information
uclaros authored and nyalldawson committed Apr 29, 2020
1 parent 4481380 commit 8dadfa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgstessellator.cpp
Expand Up @@ -439,7 +439,7 @@ void QgsTessellator::addPolygon( const QgsPolygon &polygon, float extrusionHeigh
const double *zData = !mNoZ ? exterior->zData() : nullptr; const double *zData = !mNoZ ? exterior->zData() : nullptr;
for ( int i = 0; i < 3; i++ ) for ( int i = 0; i < 3; i++ )
{ {
mData << *xData++ - mOriginX << ( mNoZ ? 0 : *zData++ ) << - *yData++ + mOriginY; mData << *xData++ - mOriginX << ( !zData ? 0 : *zData++ ) << - *yData++ + mOriginY;
if ( mAddNormals ) if ( mAddNormals )
mData << pNormal.x() << pNormal.z() << - pNormal.y(); mData << pNormal.x() << pNormal.z() << - pNormal.y();
} }
Expand Down

0 comments on commit 8dadfa4

Please sign in to comment.