Added a fallback to the standard fan tessellator for managing the cases where the glu::tessellator can fail (better than nothing...)

This commit is contained in:
Paolo Cignoni 2014-06-17 13:07:07 +00:00
parent d3a7e225ee
commit f6574c7abe
1 changed files with 2 additions and 0 deletions

View File

@ -468,6 +468,8 @@ namespace vcg {
#ifdef __gl_h_
//qDebug("OK: using opengl tessellation for a polygon of %i verteces",vertexesPerFace);
vcg::glu_tesselator::tesselate<vcg::Point3f>(polygonVect, indexTriangulatedVect);
if(indexTriangulatedVect.size()==0)
FanTessellator(polygonVect, indexTriangulatedVect);
#else
//qDebug("Warning: using fan tessellation for a polygon of %i verteces",vertexesPerFace);
FanTessellator(polygonVect, indexTriangulatedVect);