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:
parent
d3a7e225ee
commit
f6574c7abe
|
@ -468,6 +468,8 @@ namespace vcg {
|
||||||
#ifdef __gl_h_
|
#ifdef __gl_h_
|
||||||
//qDebug("OK: using opengl tessellation for a polygon of %i verteces",vertexesPerFace);
|
//qDebug("OK: using opengl tessellation for a polygon of %i verteces",vertexesPerFace);
|
||||||
vcg::glu_tesselator::tesselate<vcg::Point3f>(polygonVect, indexTriangulatedVect);
|
vcg::glu_tesselator::tesselate<vcg::Point3f>(polygonVect, indexTriangulatedVect);
|
||||||
|
if(indexTriangulatedVect.size()==0)
|
||||||
|
FanTessellator(polygonVect, indexTriangulatedVect);
|
||||||
#else
|
#else
|
||||||
//qDebug("Warning: using fan tessellation for a polygon of %i verteces",vertexesPerFace);
|
//qDebug("Warning: using fan tessellation for a polygon of %i verteces",vertexesPerFace);
|
||||||
FanTessellator(polygonVect, indexTriangulatedVect);
|
FanTessellator(polygonVect, indexTriangulatedVect);
|
||||||
|
|
Loading…
Reference in New Issue