Skip to content

Commit

Permalink
Fix bug with inner rings tesselation
Browse files Browse the repository at this point in the history
  • Loading branch information
topheg committed Dec 1, 2022
1 parent a218785 commit 377e4d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sources/src/citygml/tesselator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ void Tesselator::compute()

void Tesselator::addContour(const std::vector<TVec3d>& pts, std::vector<std::vector<TVec2f> > textureCoordinatesLists )
{
unsigned int pos = _vertices.size();
TesselatorBase::addContour(pts, textureCoordinatesLists);

gluTessBeginContour( _tobj );

unsigned int len = _vertices.size();
assert(_indices.size() == _vertices.size());
unsigned int len = pts.size();
for ( unsigned int i = 0; i < len; i++ )
{
gluTessVertex( _tobj, &(_vertices[i][0]), &_indices[i] );
gluTessVertex( _tobj, &(_vertices[pos + i][0]), &_indices[pos + i] );
}

gluTessEndContour( _tobj );
Expand Down

0 comments on commit 377e4d9

Please sign in to comment.