summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-03-29 18:46:46 +0000
committerBrian Paul <[email protected]>2006-03-29 18:46:46 +0000
commitc3051df8e18882d9c8ffb795622af24aded555b4 (patch)
treebde7e3cccbdfc830e79fbee3544d04b610357081
parentdb79d2abacfc946e80ae3ca6a27953925ccf50b9 (diff)
fixes from John Shell (bug 6339)
-rw-r--r--src/glu/sgi/libnurbs/interface/glcurveval.cc5
-rw-r--r--src/glu/sgi/libnurbs/internals/arctess.cc2
-rw-r--r--src/glu/sgi/libnurbs/internals/bufpool.h5
-rw-r--r--src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc10
4 files changed, 13 insertions, 9 deletions
diff --git a/src/glu/sgi/libnurbs/interface/glcurveval.cc b/src/glu/sgi/libnurbs/interface/glcurveval.cc
index 4713dc46722..32e4704137d 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 e633626de06..29e7cf4c002 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; i<bezierArc->order; i++, j+= bezierArc->stride)
+ for(i=1, j=bezierArc->stride; i<bezierArc->order; 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 90c775e4b75..02e4ff247b6 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 3a7d5814b7c..d168374c98a 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 <stdlib.h>
@@ -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)