| @@ -35,8 +35,8 @@ | |||
| /* | |||
| * glcurveval.c++ | |||
| * | |||
| * $Date: 2003/04/30 15:20:37 $ $Revision: 1.5 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/glcurveval.cc,v 1.5 2003/04/30 15:20:37 brianp Exp $ | |||
| * $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 $ | |||
| */ | |||
| /* Polynomial Evaluator Interface */ | |||
| @@ -208,8 +208,8 @@ OpenGLCurveEvaluator::map1f( | |||
| { | |||
| if(output_triangles) | |||
| { | |||
| int dimension; | |||
| int which; | |||
| int dimension = 0; | |||
| int which = 0; | |||
| switch(type){ | |||
| case GL_MAP1_VERTEX_3: | |||
| which = 0; | |||
| @@ -970,7 +970,6 @@ if(output_triangles) | |||
| REAL du, dv; | |||
| long i,j; | |||
| long row; | |||
| if(global_grid_nu == 0 || global_grid_nv == 0) | |||
| return; /*no points need to be output*/ | |||
| du = (global_grid_u1 - global_grid_u0) / (REAL)global_grid_nu; | |||
| @@ -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: 2001/03/17 00:25:40 $ $Revision: 1.1 $ | |||
| ** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ | |||
| */ | |||
| /* | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/incurveeval.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/incurveeval.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include <stdlib.h> | |||
| @@ -97,7 +97,7 @@ void OpenGLCurveEvaluator::inMap1f(int which, //0: vert, 1: norm, 2: color, 3: t | |||
| int uorder, | |||
| REAL *ctlpoints) | |||
| { | |||
| int i,j,x; | |||
| int i,x; | |||
| curveEvalMachine *temp_em; | |||
| switch(which){ | |||
| case 0: //vertex | |||
| @@ -139,7 +139,6 @@ void OpenGLCurveEvaluator::inDoDomain1(curveEvalMachine *em, REAL u, REAL *retPo | |||
| { | |||
| int j, row; | |||
| REAL the_uprime; | |||
| REAL p; | |||
| REAL *data; | |||
| if(em->u2 == em->u1) | |||
| @@ -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: 2002/03/23 02:29:37 $ $Revision: 1.2 $ | |||
| ** $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $ | |||
| */ | |||
| /* | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/insurfeval.cc,v 1.2 2002/03/23 02:29:37 brianp Exp $ | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/insurfeval.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include "gluos.h" | |||
| @@ -403,7 +403,6 @@ void OpenGLSurfaceEvaluator::inEvalMesh2(int lowU, int lowV, int highU, int high | |||
| { | |||
| REAL du, dv; | |||
| int i,j; | |||
| int row; | |||
| REAL point[4]; | |||
| REAL normal[3]; | |||
| if(global_grid_nu == 0 || global_grid_nv == 0) | |||
| @@ -874,7 +873,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBU(int k, REAL u, REAL v, | |||
| REAL *baseData, | |||
| REAL *retPoint, REAL* retdu, REAL *retdv) | |||
| { | |||
| int j, row, col; | |||
| int j, col; | |||
| REAL vprime; | |||
| @@ -909,7 +908,7 @@ void OpenGLSurfaceEvaluator::inDoDomain2WithDerivsBV(int k, REAL u, REAL v, | |||
| REAL *baseData, | |||
| REAL *retPoint, REAL* retdu, REAL *retdv) | |||
| { | |||
| int j, row, col; | |||
| int j, row; | |||
| REAL uprime; | |||
| @@ -1828,7 +1827,7 @@ void OpenGLSurfaceEvaluator::inDoEvalCoord2EM(REAL u, REAL v) | |||
| void OpenGLSurfaceEvaluator::inBPMEvalEM(bezierPatchMesh* bpm) | |||
| { | |||
| int i,j,k,l; | |||
| int i,j,k; | |||
| float u,v; | |||
| int ustride; | |||
| @@ -378,7 +378,9 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps | |||
| /* strength reduction on p = dp * step would introduce error */ | |||
| int step; | |||
| #ifndef NOELIMINATION | |||
| int ocanremove = 0; | |||
| #endif | |||
| register long order = bezierArc->order; | |||
| for( step=1, ++vert; step<nsteps; step++, vert++ ) { | |||
| register REAL p = dp * step; | |||
| @@ -439,7 +441,9 @@ ArcTessellator::tessellateNonlinear( Arc *arc, REAL geo_stepsize, REAL arc_steps | |||
| /* strength reduction on p = dp * step would introduce error */ | |||
| int step; | |||
| #ifndef NOELIMINATION | |||
| int ocanremove = 0; | |||
| #endif | |||
| register long order = bezierArc->order; | |||
| for( step=1, ++vert; step<nsteps; step++, vert++ ) { | |||
| register REAL p = dp * step; | |||
| @@ -35,8 +35,8 @@ | |||
| /* | |||
| * backend.c++ | |||
| * | |||
| * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/backend.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ | |||
| * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/backend.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| /* Bezier surface backend | |||
| @@ -326,7 +326,9 @@ void | |||
| Backend::tmeshvert( TrimVertex *t ) | |||
| { | |||
| #ifndef NOWIREFRAME | |||
| const long nuid = t->nuid; | |||
| #endif | |||
| const REAL u = t->param[0]; | |||
| const REAL v = t->param[1]; | |||
| @@ -365,11 +367,9 @@ Backend::tmeshvert( TrimVertex *t ) | |||
| void | |||
| Backend::tmeshvert( REAL u, REAL v ) | |||
| { | |||
| const long nuid = 0; | |||
| #ifndef NOWIREFRAME | |||
| const long nuid = 0; | |||
| npts++; | |||
| if( wireframetris ) { | |||
| if( npts >= 3 ) { | |||
| @@ -35,8 +35,8 @@ | |||
| /* | |||
| * bin.c++ | |||
| * | |||
| * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bin.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ | |||
| * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bin.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include "glimports.h" | |||
| @@ -154,12 +154,12 @@ Bin::listBezier( void ) | |||
| for( Arc_ptr jarc=firstarc(); jarc; jarc=nextarc() ) { | |||
| if( jarc->isbezier( ) ) { | |||
| assert( jarc->pwlArc->npts == 2 ); | |||
| #ifndef NDEBUG | |||
| TrimVertex *pts = jarc->pwlArc->pts; | |||
| REAL s1 = pts[0].param[0]; | |||
| REAL t1 = pts[0].param[1]; | |||
| REAL s2 = pts[1].param[0]; | |||
| REAL t2 = pts[1].param[1]; | |||
| #ifndef NDEBUG | |||
| dprintf( "arc (%g,%g) (%g,%g)\n", s1, t1, s2, t2 ); | |||
| #endif | |||
| } | |||
| @@ -35,8 +35,8 @@ | |||
| /* | |||
| * bufpool.c++ | |||
| * | |||
| * $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bufpool.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $ | |||
| * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/bufpool.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include "glimports.h" | |||
| @@ -50,7 +50,10 @@ | |||
| */ | |||
| Pool::Pool( int _buffersize, int initpoolsize, char *n ) | |||
| { | |||
| buffersize= (_buffersize < sizeof(Buffer)) ? sizeof(Buffer) : _buffersize; | |||
| if((unsigned)_buffersize < sizeof(Buffer)) | |||
| buffersize = sizeof(Buffer); | |||
| else | |||
| buffersize = _buffersize; | |||
| initsize = initpoolsize * buffersize; | |||
| nextsize = initsize; | |||
| name = n; | |||
| @@ -35,8 +35,8 @@ | |||
| /* | |||
| * curve.c++ | |||
| * | |||
| * $Date: 2001/08/13 16:52:18 $ $Revision: 1.2 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curve.cc,v 1.2 2001/08/13 16:52:18 brianp Exp $ | |||
| * $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/curve.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include "glimports.h" | |||
| @@ -67,7 +67,6 @@ Curve::Curve( Quilt_ptr geo, REAL pta, REAL ptb, Curve *c ) | |||
| Quiltspec_ptr qs = geo->qspec; | |||
| ps += qs->offset; | |||
| ps += qs->index * qs->order * qs->stride; | |||
| REAL *pend = ps + qs->order * qs->stride; | |||
| if( needsSampling ) | |||
| mapdesc->xformSampling( ps, qs->order, qs->stride, spts, stride ); | |||
| @@ -35,8 +35,8 @@ | |||
| /* | |||
| * intersect.c++ | |||
| * | |||
| * $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ | |||
| * $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include "glimports.h" | |||
| @@ -175,7 +175,7 @@ int | |||
| Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir ) | |||
| { | |||
| int maxvertex = jarc->pwlArc->npts; | |||
| Arc_ptr jarc1, jarc2, jarc3; | |||
| Arc_ptr jarc1; | |||
| TrimVertex* v = jarc->pwlArc->pts; | |||
| int loc[3]; | |||
| @@ -258,7 +258,8 @@ Subdivider::arc_split( Arc_ptr jarc, int param, REAL value, int dir ) | |||
| #endif //not NOTDEF | |||
| // JEB: This is the original version: | |||
| #ifdef NOTDEF | |||
| Arc_ptr jarc2, jarc3; | |||
| TrimVertex *newjunk = trimvertexpool.get(3); | |||
| v[i].nuid = jarc->nuid; | |||
| v[j].nuid = jarc->nuid; | |||
| @@ -35,8 +35,8 @@ | |||
| /* | |||
| * mapdescv.c++ | |||
| * | |||
| * $Date: 2001/08/13 16:52:18 $ $Revision: 1.2 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdescv.cc,v 1.2 2001/08/13 16:52:18 brianp Exp $ | |||
| * $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $ | |||
| * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdescv.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include "glimports.h" | |||
| @@ -127,12 +127,16 @@ Mapdesc::calcPartialVelocity ( | |||
| REAL *mp = &mag[0][0]; | |||
| const int istride = sizeof( tmp[0]) / sizeof( tmp[0][0][0] ); | |||
| const int jstride = sizeof( tmp[0][0]) / sizeof( tmp[0][0][0] ); | |||
| /* | |||
| const int kstride = sizeof( tmp[0][0][0]) / sizeof( tmp[0][0][0] ); | |||
| */ | |||
| const int mistride = sizeof( mag[0]) / sizeof( mag[0][0] ); | |||
| const int mjstride = sizeof( mag[0][0]) / sizeof( mag[0][0] ); | |||
| const int idist = nrows * istride; | |||
| const int jdist = ncols * jstride; | |||
| /* | |||
| const int kdist = inhcoords * kstride; | |||
| */ | |||
| const int id = idist - spartial * istride; | |||
| const int jd = jdist - tpartial * jstride; | |||
| @@ -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: 2001/03/17 00:25:41 $ $Revision: 1.1 $ | |||
| ** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ | |||
| */ | |||
| /* | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include "monoTriangulation.h" | |||
| @@ -45,7 +45,9 @@ | |||
| void reflexChain::outputFan(Real v[2], Backend* backend) | |||
| { | |||
| Int i; | |||
| /* | |||
| TrimVertex trimVert; | |||
| */ | |||
| backend->bgntfan(); | |||
| /* | |||
| @@ -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: 2001/03/17 00:25:41 $ $Revision: 1.1 $ | |||
| ** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $ | |||
| */ | |||
| /* | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $ | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include "gluos.h" | |||
| @@ -63,7 +63,7 @@ extern Int deleteRepeatDiagonals(Int num_diagonals, directedLine** diagonal_vert | |||
| //for debug purpose only | |||
| static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices) | |||
| { | |||
| Int i,k; | |||
| Int i; | |||
| for(i=0; i<num_diagonals; i++) | |||
| { | |||
| glBegin(GL_LINE); | |||
| @@ -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: 2001/03/22 11:41:40 $ $Revision: 1.2 $ | |||
| ** $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $ | |||
| */ | |||
| /* | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.2 2001/03/22 11:41:40 joukj Exp $ | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include <stdlib.h> | |||
| @@ -740,8 +740,10 @@ void monoTriangulationRecFunGen(Real* topVertex, Real* botVertex, | |||
| assert( inc_chain != NULL && dec_chain != NULL); | |||
| assert( ! (inc_current> inc_end && | |||
| dec_current> dec_end)); | |||
| /* | |||
| Int inc_nVertices; | |||
| Int dec_nVertices; | |||
| */ | |||
| Real** inc_array ; | |||
| Real** dec_array ; | |||
| Int i; | |||
| @@ -719,7 +719,6 @@ sampledLine* DBG_collectSampledLinesAllPoly(directedLine *polygonList) | |||
| void DBG_collectSampledLinesPoly(directedLine *polygon, sampledLine*& retHead, sampledLine*& retTail) | |||
| { | |||
| directedLine *temp; | |||
| sampledLine *ret = NULL; | |||
| retHead = NULL; | |||
| retTail = NULL; | |||
| if(polygon == NULL) | |||
| @@ -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: 2002/11/08 17:38:13 $ $Revision: 1.3 $ | |||
| ** $Date: 2004/05/12 15:29:36 $ $Revision: 1.4 $ | |||
| */ | |||
| /* | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.3 2002/11/08 17:38:13 brianp Exp $ | |||
| ** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.4 2004/05/12 15:29:36 brianp Exp $ | |||
| */ | |||
| #include "gluos.h" | |||
| @@ -980,8 +980,10 @@ void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGrid | |||
| Int n_ulines = grid->get_n_ulines(); | |||
| Real uMin = grid->get_u_min(); | |||
| Real uMax = grid->get_u_max(); | |||
| /* | |||
| Real vMin = grid->get_v_min(); | |||
| Real vMax = grid->get_v_max(); | |||
| */ | |||
| Real slop, uinterc; | |||
| #ifdef SHORTEN_GRID_LINE | |||
| @@ -1096,8 +1098,10 @@ void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGri | |||
| Int n_ulines = grid->get_n_ulines(); | |||
| Real uMin = grid->get_u_min(); | |||
| Real uMax = grid->get_u_max(); | |||
| /* | |||
| Real vMin = grid->get_v_min(); | |||
| Real vMax = grid->get_v_max(); | |||
| */ | |||
| Real slop, uinterc; | |||
| #ifdef SHORTEN_GRID_LINE | |||