From c3051df8e18882d9c8ffb795622af24aded555b4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 29 Mar 2006 18:46:46 +0000 Subject: fixes from John Shell (bug 6339) --- src/glu/sgi/libnurbs/interface/glcurveval.cc | 5 +++-- src/glu/sgi/libnurbs/internals/arctess.cc | 2 +- src/glu/sgi/libnurbs/internals/bufpool.h | 5 +++-- src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc | 10 ++++++---- 4 files changed, 13 insertions(+), 9 deletions(-) (limited to 'src/glu') diff --git a/src/glu/sgi/libnurbs/interface/glcurveval.cc b/src/glu/sgi/libnurbs/interface/glcurveval.cc index 4713dc4672..32e4704137 100644 --- a/src/glu/sgi/libnurbs/interface/glcurveval.cc +++ b/src/glu/sgi/libnurbs/interface/glcurveval.cc @@ -35,8 +35,8 @@ /* * glcurveval.c++ * - * $Date: 2004/05/12 15:29:36 $ $Revision: 1.6 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.cc,v 1.6 2004/05/12 15:29:36 brianp Exp $ + * $Date: 2006/03/29 18:46:46 $ $Revision: 1.7 $ + * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.cc,v 1.7 2006/03/29 18:46:46 brianp Exp $ */ /* Polynomial Evaluator Interface */ @@ -74,6 +74,7 @@ OpenGLCurveEvaluator::OpenGLCurveEvaluator(void) em_normal.uprime = -1.0; em_color.uprime = -1.0; em_texcoord.uprime = -1.0; + output_triangles = 0; // don't output triangles by default } OpenGLCurveEvaluator::~OpenGLCurveEvaluator(void) diff --git a/src/glu/sgi/libnurbs/internals/arctess.cc b/src/glu/sgi/libnurbs/internals/arctess.cc index e633626de0..29e7cf4c00 100644 --- a/src/glu/sgi/libnurbs/internals/arctess.cc +++ b/src/glu/sgi/libnurbs/internals/arctess.cc @@ -335,7 +335,7 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps REAL min_u, min_v, max_u,max_v; min_u = max_u = bezierArc->cpts[0]; min_v = max_v = bezierArc->cpts[1]; - for(i=1, j=2; iorder; i++, j+= bezierArc->stride) + for(i=1, j=bezierArc->stride; iorder; i++, j+= bezierArc->stride) { if(bezierArc->cpts[j] < min_u) min_u = bezierArc->cpts[j]; diff --git a/src/glu/sgi/libnurbs/internals/bufpool.h b/src/glu/sgi/libnurbs/internals/bufpool.h index 90c775e4b7..02e4ff247b 100644 --- a/src/glu/sgi/libnurbs/internals/bufpool.h +++ b/src/glu/sgi/libnurbs/internals/bufpool.h @@ -35,8 +35,8 @@ /* * bufpool.h * - * $Date: 2001/03/22 11:38:36 $ $Revision: 1.2 $ - * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bufpool.h,v 1.2 2001/03/22 11:38:36 joukj Exp $ + * $Date: 2006/03/29 18:46:46 $ $Revision: 1.3 $ + * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bufpool.h,v 1.3 2006/03/29 18:46:46 brianp Exp $ */ #ifndef __glubufpool_h_ @@ -128,6 +128,7 @@ public: inline void * operator new( size_t s) { return ::new char[s]; } inline void operator delete( void * ) { assert( 0 ); } + inline void operator delete( void *, Pool & ) { assert( 0 ); } inline void deleteMe( Pool & ); }; diff --git a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc index 3a7d5814b7..d168374c98 100644 --- a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc +++ b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc @@ -31,10 +31,10 @@ ** published by SGI, but has not been independently verified as being ** compliant with the OpenGL(R) version 1.2.1 Specification. ** -** $Date: 2005/10/28 13:09:23 $ $Revision: 1.4 $ +** $Date: 2006/03/29 18:46:46 $ $Revision: 1.5 $ */ /* -** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.4 2005/10/28 13:09:23 brianp Exp $ +** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.5 2006/03/29 18:46:46 brianp Exp $ */ #include @@ -619,8 +619,10 @@ void monoTriangulationFun(directedLine* monoPolygon, Int (*compFun)(Real*, Real* dec_chain.appendVertex(tempV->getVertex(i)); } - monoTriangulationRecFun(topV->head(), botV->head(), &inc_chain, 0, &dec_chain, 0, compFun, pStream); - + if (!(0 == inc_chain.getNumElements() && 0 == dec_chain.getNumElements())) { + monoTriangulationRecFun(topV->head(), botV->head(), &inc_chain, 0, + &dec_chain, 0, compFun, pStream); + } } void monoTriangulation(directedLine* monoPolygon, primStream* pStream) -- cgit v1.2.3