From 29b86f9852b2b7ecc31cdfee56679537e40bc6e2 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 12 Apr 2010 09:53:17 +0000 Subject: svn merge -r524:HEAD "^/branches/released" . --- mesalib/src/glu/sgi/libnurbs/internals/arc.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/arc.h | 6 ++++++ mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h | 1 - mesalib/src/glu/sgi/libnurbs/internals/backend.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/bin.cc | 1 + mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc | 3 +++ mesalib/src/glu/sgi/libnurbs/internals/curve.cc | 6 ++++++ mesalib/src/glu/sgi/libnurbs/internals/curvelist.cc | 12 +++++++----- mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/displaylist.h | 1 + mesalib/src/glu/sgi/libnurbs/internals/gridvertex.h | 2 +- mesalib/src/glu/sgi/libnurbs/internals/knotvector.cc | 3 +++ mesalib/src/glu/sgi/libnurbs/internals/maplist.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/mesher.cc | 3 +++ mesalib/src/glu/sgi/libnurbs/internals/patchlist.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/quilt.cc | 2 -- mesalib/src/glu/sgi/libnurbs/internals/reader.cc | 2 ++ mesalib/src/glu/sgi/libnurbs/internals/reader.h | 14 +++++++------- mesalib/src/glu/sgi/libnurbs/internals/renderhints.cc | 5 ++++- mesalib/src/glu/sgi/libnurbs/internals/simplemath.h | 2 ++ mesalib/src/glu/sgi/libnurbs/internals/slicer.cc | 4 ++++ mesalib/src/glu/sgi/libnurbs/internals/subdivider.cc | 6 ++++-- mesalib/src/glu/sgi/libnurbs/internals/trimregion.cc | 1 - mesalib/src/glu/sgi/libnurbs/internals/uarray.cc | 1 + mesalib/src/glu/sgi/libnurbs/internals/varray.cc | 8 ++++++++ 25 files changed, 63 insertions(+), 25 deletions(-) (limited to 'mesalib/src/glu/sgi/libnurbs/internals') diff --git a/mesalib/src/glu/sgi/libnurbs/internals/arc.cc b/mesalib/src/glu/sgi/libnurbs/internals/arc.cc index b85139de9..cd4c4048a 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/arc.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/arc.cc @@ -43,7 +43,6 @@ #include "myassert.h" #include "arc.h" #include "bin.h" -#include "bezierarc.h" #include "pwlarc.h" #include "simplemath.h" diff --git a/mesalib/src/glu/sgi/libnurbs/internals/arc.h b/mesalib/src/glu/sgi/libnurbs/internals/arc.h index e986019c3..ca397f3b1 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/arc.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/arc.h @@ -108,6 +108,9 @@ public: inline Arc::Arc( Arc *j, PwlArc *p ) { + prev = NULL; + next = NULL; + link = NULL; bezierArc = NULL; pwlArc = p; type = j->type; @@ -123,6 +126,9 @@ Arc::Arc( Arc *j, PwlArc *p ) inline Arc::Arc( arc_side side, long _nuid ) { + prev = NULL; + next = NULL; + link = NULL; bezierArc = NULL; pwlArc = NULL; type = 0; diff --git a/mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h b/mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h index d72dd1e86..a55df9267 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/arcsorter.h @@ -37,7 +37,6 @@ #define __gluarcsorter_h_ #include "sorter.h" -#include "arcsorter.h" class Arc; class Subdivider; diff --git a/mesalib/src/glu/sgi/libnurbs/internals/backend.cc b/mesalib/src/glu/sgi/libnurbs/internals/backend.cc index 88dc3f516..27b41ebb2 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/backend.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/backend.cc @@ -46,7 +46,6 @@ #include "backend.h" #include "basiccrveval.h" #include "basicsurfeval.h" -#include "nurbsconsts.h" #define NOWIREFRAME diff --git a/mesalib/src/glu/sgi/libnurbs/internals/bin.cc b/mesalib/src/glu/sgi/libnurbs/internals/bin.cc index 54b406147..ff75b86be 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/bin.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/bin.cc @@ -49,6 +49,7 @@ Bin::Bin() { head = NULL; + current = NULL; } Bin::~Bin() diff --git a/mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc b/mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc index 8cc847ab2..53ac1a569 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/bufpool.cc @@ -60,6 +60,9 @@ Pool::Pool( int _buffersize, int initpoolsize, const char *n ) curblock = 0; freelist = 0; nextfree = 0; + for (int i = 0; i < NBLOCKS; i++) { + blocklist[i] = 0; + } } /*----------------------------------------------------------------------------- diff --git a/mesalib/src/glu/sgi/libnurbs/internals/curve.cc b/mesalib/src/glu/sgi/libnurbs/internals/curve.cc index 33e275264..b7c4d4a9c 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/curve.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/curve.cc @@ -60,6 +60,12 @@ Curve::Curve( Quilt_ptr geo, REAL pta, REAL ptb, Curve *c ) cullval = mapdesc->isCulling() ? CULL_ACCEPT : CULL_TRIVIAL_ACCEPT; order = geo->qspec[0].order; stride = MAXCOORDS; + for( int i = 0; i < MAXORDER * MAXCOORDS; i++ ) { + cpts[i] = 0; + spts[i] = 0; + } + stepsize = 0; + minstepsize = 0; REAL *ps = geo->cpts; Quiltspec_ptr qs = geo->qspec; diff --git a/mesalib/src/glu/sgi/libnurbs/internals/curvelist.cc b/mesalib/src/glu/sgi/libnurbs/internals/curvelist.cc index 872eb5816..8f2ee4678 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/curvelist.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/curvelist.cc @@ -43,7 +43,6 @@ #include "quilt.h" #include "curvelist.h" #include "curve.h" -#include "nurbsconsts.h" #include "types.h" Curvelist::Curvelist( Quilt *quilts, REAL pta, REAL ptb ) @@ -54,20 +53,23 @@ Curvelist::Curvelist( Quilt *quilts, REAL pta, REAL ptb ) range[0] = pta; range[1] = ptb; range[2] = ptb - pta; + needsSubdivision = 0; + stepsize = 0; } Curvelist::Curvelist( Curvelist &upper, REAL value ) { - Curvelist &lower = *this; curve = 0; for( Curve *c = upper.curve; c; c = c->next ) curve = new Curve( *c, value, curve ); - lower.range[0] = upper.range[0]; - lower.range[1] = value; - lower.range[2] = value - upper.range[0]; + range[0] = upper.range[0]; + range[1] = value; + range[2] = value - upper.range[0]; upper.range[0] = value; upper.range[2] = upper.range[1] - value; + needsSubdivision = 0; + stepsize = 0; } Curvelist::~Curvelist() diff --git a/mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc b/mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc index f85acc269..91f2ca8ce 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/curvesub.cc @@ -45,7 +45,6 @@ #include "backend.h" #include "quilt.h" #include "curvelist.h" -#include "curve.h" #include "nurbsconsts.h" /*-------------------------------------------------------------------------- diff --git a/mesalib/src/glu/sgi/libnurbs/internals/displaylist.h b/mesalib/src/glu/sgi/libnurbs/internals/displaylist.h index 22cbec378..d009a4251 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/displaylist.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/displaylist.h @@ -59,6 +59,7 @@ Dlnode::Dlnode( PFVS _work, void *_arg, PFVS _cleanup ) work = _work; arg = _arg; cleanup = _cleanup; + next = 0; } class DisplayList { diff --git a/mesalib/src/glu/sgi/libnurbs/internals/gridvertex.h b/mesalib/src/glu/sgi/libnurbs/internals/gridvertex.h index 36a65c7bd..2e27436ef 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/gridvertex.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/gridvertex.h @@ -38,7 +38,7 @@ struct GridVertex { long gparam[2]; - GridVertex( void ) {} + GridVertex( void ) { gparam[0] = 0, gparam[1] = 0; } GridVertex( long u, long v ) { gparam[0] = u, gparam[1] = v; } void set( long u, long v ) { gparam[0] = u, gparam[1] = v; } long nextu() { return gparam[0]++; } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/knotvector.cc b/mesalib/src/glu/sgi/libnurbs/internals/knotvector.cc index 9eb5cbace..dcbf0067d 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/knotvector.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/knotvector.cc @@ -61,6 +61,9 @@ void Knotvector::init( long _knotcount, long _stride, long _order, INREAL *_knot Knotvector::Knotvector( void ) { + knotcount = 0; + stride = 0; + order = 0; knotlist = 0; } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/maplist.cc b/mesalib/src/glu/sgi/libnurbs/internals/maplist.cc index f944d1529..e51a3e85d 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/maplist.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/maplist.cc @@ -44,7 +44,6 @@ #include "nurbsconsts.h" #include "maplist.h" #include "mapdesc.h" -#include "backend.h" Maplist::Maplist( Backend& b ) : mapdescPool( sizeof( Mapdesc ), 10, "mapdesc pool" ), diff --git a/mesalib/src/glu/sgi/libnurbs/internals/mesher.cc b/mesalib/src/glu/sgi/libnurbs/internals/mesher.cc index 9cc436adb..b2d83f412 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/mesher.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/mesher.cc @@ -58,6 +58,9 @@ Mesher::Mesher( Backend& b ) { stacksize = 0; vdata = 0; + last[0] = 0; + last[1] = 0; + itop = 0; lastedge = 0; //needed to prevent purify UMR } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/patchlist.cc b/mesalib/src/glu/sgi/libnurbs/internals/patchlist.cc index 989d2dd00..6a400ab6f 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/patchlist.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/patchlist.cc @@ -44,7 +44,6 @@ #include "quilt.h" #include "patchlist.h" #include "patch.h" -#include "nurbsconsts.h" Patchlist::Patchlist( Quilt *quilts, REAL *pta, REAL *ptb ) { diff --git a/mesalib/src/glu/sgi/libnurbs/internals/quilt.cc b/mesalib/src/glu/sgi/libnurbs/internals/quilt.cc index 4fc58b747..d16f4bfec 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/quilt.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/quilt.cc @@ -44,9 +44,7 @@ #include "backend.h" #include "mapdesc.h" #include "flist.h" -#include "knotvector.h" #include "patchlist.h" -#include "math.h" //fglu_abs() #include "simplemath.h" //min() /* local preprocessor definitions */ diff --git a/mesalib/src/glu/sgi/libnurbs/internals/reader.cc b/mesalib/src/glu/sgi/libnurbs/internals/reader.cc index 6135eef60..c59240d26 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/reader.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/reader.cc @@ -64,6 +64,7 @@ O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride, owner = 0; pts = trimpts; npts = (int) count; + save = 0; int i; /* copy user data into internal trimming data structures */ @@ -115,6 +116,7 @@ O_pwlcurve::O_pwlcurve( long _type, long count, INREAL *array, long byte_stride, owner = 0; pts = trimpts; npts = (int) count; + save = 0; /* copy user data into internal trimming data structures */ switch( _type ) { diff --git a/mesalib/src/glu/sgi/libnurbs/internals/reader.h b/mesalib/src/glu/sgi/libnurbs/internals/reader.h index 8a8dcebb5..cae6cada4 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/reader.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/reader.h @@ -64,7 +64,7 @@ struct O_curve : public PooledObj { int save; /* 1 if in display list */ long nuid; O_curve() { next = 0; used = 0; owner = 0; - curve.o_pwlcurve = 0; } + curve.o_pwlcurve = 0; curvetype = ct_none; save = 0; nuid = 0; } }; struct O_nurbscurve : public PooledObj { @@ -77,7 +77,7 @@ struct O_nurbscurve : public PooledObj { int save; /* 1 if in display list */ O_curve * owner; /* owning curve */ O_nurbscurve( long _type ) - { type = _type; owner = 0; next = 0; used = 0; } + { bezier_curves = 0; type = _type; tesselation = 0; method = 0; next = 0; used = 0; save = 0; owner = 0; } }; class O_pwlcurve : public PooledObj { @@ -95,7 +95,7 @@ struct O_trim : public PooledObj { O_curve *o_curve; /* closed trim loop */ O_trim * next; /* next loop along trim */ int save; /* 1 if in display list */ - O_trim() { next = 0; o_curve = 0; } + O_trim() { next = 0; o_curve = 0; save = 0; } }; struct O_nurbssurface : public PooledObj { @@ -106,7 +106,7 @@ struct O_nurbssurface : public PooledObj { int save; /* 1 if in display list */ int used; /* 1 if prev called in block */ O_nurbssurface( long _type ) - { type = _type; owner = 0; next = 0; used = 0; } + { bezier_patches = 0; type = _type; owner = 0; next = 0; save = 0; used = 0; } }; struct O_surface : public PooledObj { @@ -114,7 +114,7 @@ struct O_surface : public PooledObj { O_trim * o_trim; /* list of trim loops */ int save; /* 1 if in display list */ long nuid; - O_surface() { o_trim = 0; o_nurbssurface = 0; } + O_surface() { o_trim = 0; o_nurbssurface = 0; save = 0; nuid = 0; } }; struct Property : public PooledObj { @@ -123,9 +123,9 @@ struct Property : public PooledObj { REAL value; int save; /* 1 if in display list */ Property( long _type, long _tag, INREAL _value ) - { type = _type; tag = _tag; value = (REAL) _value; } + { type = _type; tag = _tag; value = (REAL) _value; save = 0; } Property( long _tag, INREAL _value ) - { type = 0; tag = _tag; value = (REAL) _value; } + { type = 0; tag = _tag; value = (REAL) _value; save = 0; } }; class NurbsTessellator; diff --git a/mesalib/src/glu/sgi/libnurbs/internals/renderhints.cc b/mesalib/src/glu/sgi/libnurbs/internals/renderhints.cc index a3aa62d42..4b347ebc7 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/renderhints.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/renderhints.cc @@ -40,7 +40,6 @@ #include "glimports.h" #include "mystdio.h" #include "renderhints.h" -#include "defines.h" #include "nurbsconsts.h" @@ -54,6 +53,10 @@ Renderhints::Renderhints() errorchecking = N_MSG; subdivisions = 6.0; tmp1 = 0.0; + displaydomain = 0; + maxsubdivisions = (int) subdivisions; + wiretris = 0; + wirequads = 0; } void diff --git a/mesalib/src/glu/sgi/libnurbs/internals/simplemath.h b/mesalib/src/glu/sgi/libnurbs/internals/simplemath.h index 0a060c57e..d00062dc7 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/simplemath.h +++ b/mesalib/src/glu/sgi/libnurbs/internals/simplemath.h @@ -38,6 +38,8 @@ /* simple inline routines */ +#include "types.h" + inline int max( int x, int y ) { return ( x < y ) ? y : x; } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/slicer.cc b/mesalib/src/glu/sgi/libnurbs/internals/slicer.cc index 27d2a650d..1b18d73c1 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/slicer.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/slicer.cc @@ -1181,6 +1181,10 @@ void Slicer::slice(Arc_ptr loop) Slicer::Slicer( Backend &b ) : CoveAndTiler( b ), Mesher( b ), backend( b ) { + oneOverDu = 0; + du = 0; + dv = 0; + isolines = 0; ulinear = 0; vlinear = 0; } diff --git a/mesalib/src/glu/sgi/libnurbs/internals/subdivider.cc b/mesalib/src/glu/sgi/libnurbs/internals/subdivider.cc index cc0b51470..ccddc270f 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/subdivider.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/subdivider.cc @@ -531,16 +531,18 @@ Subdivider::nonSamplingSplit( patchlist.pspec[param].range[1] ) * 0.5; split( source, left, right, param, mid ); Patchlist subpatchlist( patchlist, param, mid ); - if( left.isnonempty() ) + if( left.isnonempty() ) { if( subpatchlist.cullCheck() == CULL_TRIVIAL_REJECT ) freejarcs( left ); else nonSamplingSplit( left, subpatchlist, subdivisions-1, param ); - if( right.isnonempty() ) + } + if( right.isnonempty() ) { if( patchlist.cullCheck() == CULL_TRIVIAL_REJECT ) freejarcs( right ); else nonSamplingSplit( right, patchlist, subdivisions-1, param ); + } } else { // make bbox calls diff --git a/mesalib/src/glu/sgi/libnurbs/internals/trimregion.cc b/mesalib/src/glu/sgi/libnurbs/internals/trimregion.cc index efe789356..4aeb5eeac 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/trimregion.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/trimregion.cc @@ -41,7 +41,6 @@ #include "myassert.h" #include "mystdio.h" #include "trimregion.h" -#include "backend.h" TrimRegion::TrimRegion( void ) { diff --git a/mesalib/src/glu/sgi/libnurbs/internals/uarray.cc b/mesalib/src/glu/sgi/libnurbs/internals/uarray.cc index f0e236437..4b3329c0f 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/uarray.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/uarray.cc @@ -47,6 +47,7 @@ Uarray::Uarray( void ) { uarray = 0; size = 0; + ulines = 0; } Uarray::~Uarray( void ) diff --git a/mesalib/src/glu/sgi/libnurbs/internals/varray.cc b/mesalib/src/glu/sgi/libnurbs/internals/varray.cc index 31cc73a9d..1cb235443 100644 --- a/mesalib/src/glu/sgi/libnurbs/internals/varray.cc +++ b/mesalib/src/glu/sgi/libnurbs/internals/varray.cc @@ -53,8 +53,16 @@ inline long sgn( REAL x ) Varray::Varray( void ) { + int i; + varray = 0; size = 0; + numquads = 0; + + for (i = 0; i < 1000; i++) { + vval[i] = 0; + voffset[i] = 0; + } } Varray::~Varray( void ) -- cgit v1.2.3