# Makefile for Win32
-#
-# Sept 12, 2001
-# Note: The nurbs code is not being built at this time.
-# If you want to work on it, uncomment the definitions
-# noted below to try to compile the sources.
-# There are numerous problems, some of which may be solved
-# by setting some #defines.
-#
-
!include <win32.mak>
.SUFFIXES : .cc
gludll : $(GLUDLL)
-CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -Iinclude -DBUILD_GL32
+CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -Iinclude -DBUILD_GL32 -DLIBRARYBUILD
LFLAGS = $(dlllflags) $(lcommon) $(LFLAGS)
-OBJS = $(GLU_SRCS:.c=.obj)
LIBS = ../lib/$(MESALIB) winmm.lib $(guilibsdll)
-# Uncomment these definitions to try to compile the NURBS code.
-#OBJS = $(GLU_SRCS_CC:.cc=.obj) $(GLU_SRCS:.c=.obj)
-#NURBSINC = -Ilibnurbs\interface -Ilibnurbs\internals -Ilibnurbs\nurbtess
-#CFLAGS = $(CFLAGS) $(NURBSINC)
+OBJS = $(GLU_SRCS_CC:.cc=.obj) $(GLU_SRCS:.c=.obj)
+NURBSINC = -Ilibnurbs\interface -Ilibnurbs\internals -Ilibnurbs\nurbtess
+CFLAGS = $(CFLAGS) $(NURBSINC)
$(GLUDLL): $(OBJS) glu.def
$(link) $(LFLAGS) -out:$(GLUDLL) -def:glu.def $(OBJS) $(LIBS)
VERSION 3.5
EXPORTS
+ gluBeginCurve
gluBeginPolygon
+ gluBeginSurface
+ gluBeginTrim
gluBuild1DMipmapLevels
gluBuild1DMipmaps
gluBuild2DMipmapLevels
gluBuild3DMipmaps
gluCheckExtension
gluCylinder
+ gluDeleteNurbsRenderer
gluDeleteQuadric
gluDeleteTess
gluDisk
+ gluEndCurve
gluEndPolygon
+ gluEndSurface
+ gluEndTrim
gluErrorString
+ gluGetNurbsProperty
gluGetString
gluGetTessProperty
+ gluLoadSamplingMatrices
gluLookAt
+ gluNewNurbsRenderer
gluNewQuadric
gluNewTess
gluNextContour
+ gluNurbsCallback
+ gluNurbsCallbackData
+ gluNurbsCallbackDataEXT
+ gluNurbsCurve
+ gluNurbsProperty
+ gluNurbsSurface
gluOrtho2D
gluPartialDisk
gluPerspective
gluPickMatrix
gluProject
+ gluPwlCurve
gluQuadricCallback
gluQuadricDrawStyle
gluQuadricNormals
** 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: 2001/11/29 16:16:55 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/interface/bezierEval.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/bezierEval.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#include <stdlib.h>
{
float uprime = (u-u0)/(u1-u0);
float *ctlptr = ctlpoints;
- float oneMinusX = 1.0-uprime;
- float XPower = 1.0;
+ float oneMinusX = 1.0f-uprime;
+ float XPower = 1.0f;
int i,k;
for(k=0; k<dimension; k++)
*/
void bezierSurfEvalDerGen(int uder, int vder, float u0, float u1, int uorder, float v0, float v1, int vorder, int dimension, float *ctlpoints, int ustride, int vstride, float u, float v, float ret[])
{
- int i,j,k;
+ int i;
float newPoints[MAX_ORDER][MAX_DIMENSION];
for(i=0; i<uorder; i++){
/*if size is 0, then nothing is done*/
static void normalize(float vec[3])
{
- float size = sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]);
+ float size = (float)sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2]);
if(size < TOLERANCE)
{
/*
* mapdesc.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/mapdesc.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+ * $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mapdesc.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#include <stdio.h>
unsigned int bits = clipbits( cpts );
outbits |= bits;
inbits &= bits;
- if( ( outbits == mask ) && ( inbits != mask ) ) return CULL_ACCEPT;
+ if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT;
}
}
- if( outbits != mask ) {
+ if( outbits != (unsigned int)mask ) {
return CULL_TRIVIAL_REJECT;
- } else if( inbits == mask ) {
+ } else if( inbits == (unsigned int)mask ) {
return CULL_TRIVIAL_ACCEPT;
} else {
return CULL_ACCEPT;
unsigned int bits = clipbits( q );
outbits |= bits;
inbits &= bits;
- if( ( outbits == mask ) && ( inbits != mask ) ) return CULL_ACCEPT;
+ if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT;
}
}
- if( outbits != mask ) {
+ if( outbits != (unsigned int)mask ) {
return CULL_TRIVIAL_REJECT;
- } else if( inbits == mask ) {
+ } else if( inbits == (unsigned int)mask ) {
return CULL_TRIVIAL_ACCEPT;
} else {
return CULL_ACCEPT;
unsigned int bits = clipbits( p );
outbits |= bits;
inbits &= bits;
- if( ( outbits == mask ) && ( inbits != mask ) ) return CULL_ACCEPT;
+ if( ( outbits == (unsigned int)mask ) && ( inbits != (unsigned int)mask ) ) return CULL_ACCEPT;
}
- if( outbits != mask ) {
+ if( outbits != (unsigned int)mask ) {
return CULL_TRIVIAL_REJECT;
- } else if( inbits == mask ) {
+ } else if( inbits == (unsigned int)mask ) {
return CULL_TRIVIAL_ACCEPT;
} else {
return CULL_ACCEPT;
/*
* mesher.c++
*
- * $Date: 2001/08/07 17:34:11 $ $Revision: 1.2 $
- * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mesher.cc,v 1.2 2001/08/07 17:34:11 brianp Exp $
+ * $Date: 2001/11/29 16:16:55 $ $Revision: 1.3 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/mesher.cc,v 1.3 2001/11/29 16:16:55 kschultz Exp $
*/
#include "glimports.h"
inline void
Mesher::push( GridTrimVertex *gt )
{
- assert( itop+1 != stacksize );
+ assert( itop+1 != (int)stacksize );
vdata[++itop] = gt;
}
/*
* sorter.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/sorter.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
+ * $Date: 2001/11/29 16:16:55 $ $Revision: 1.2 $
+ * $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/sorter.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#include "glimports.h"
unsigned int n;
start:
- if((n=l-a) <= es)
+ if((n=l-a) <= (unsigned int)es)
return;
n = es * (n / (2*es));
hp = lp = a+n;
** 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: 2001/11/29 16:16:55 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/directedLine.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/directedLine.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#include <stdlib.h>
y2 = temp->next->head()[1];
ret += -( x2*y1-x1*y2);
}
- return 0.5*ret;
+ return Real(0.5)*ret;
}
/*******************split or combine polygons begin********************/
** 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: 2001/11/29 16:16:55 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/partitionY.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/partitionY.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#include <stdlib.h>
*/
inline/*static*/ Real intersectHoriz(Real x1, Real y1, Real x2, Real y2, Real y)
{
- return ((y2==y1)? (x1+x2)*0.5 : x1 + ((y-y1)/(y2-y1)) * (x2-x1));
+ return ((y2==y1)? (x1+x2)*Real(0.5) : x1 + ((y-y1)/(y2-y1)) * (x2-x1));
/*
if(y2 == y1) return (x1+x2)*0.5;
else return x1 + ((y-y1)/(y2-y1)) * (x2-x1);
Real Ymax = min(e1_Ymax, e2_Ymax);
Real Ymin = max(e1_Ymin, e2_Ymin);
- Real y = 0.5*(Ymax + Ymin);
+ Real y = Real(0.5)*(Ymax + Ymin);
/* Real x1 = intersectHoriz(e1->head()[0], e1->head()[1], e1->tail()[0], e1->tail()[1], y);
Real x2 = intersectHoriz(e2->head()[0], e2->head()[1], e2->tail()[0], e2->tail()[1], y);
** 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: 2001/11/29 16:16:55 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/polyDBG.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/polyDBG.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#include <stdlib.h>
*/
/*for debug purpose*/
assert( (DBG_rayIntersectPoly(v,1,0,poly) % 2 )
- == (DBG_rayIntersectPoly(v,1,0.1234, poly) % 2 )
+ == (DBG_rayIntersectPoly(v,1,Real(0.1234), poly) % 2 )
);
if(DBG_rayIntersectPoly(v, 1, 0, poly) % 2 == 1)
return 1;
** 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: 2001/11/29 16:16:55 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/polyUtil.h,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/polyUtil.h,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#ifndef _POLYUTIL_H
#define _POLYUTIL_H
#include "definitions.h"
-
+#ifdef __cplusplus
+extern "C" {
+#endif
Real area(Real A[2], Real B[2], Real C[2]);
Int pointLeftLine(Real A[2], Real B[2], Real P[2]);
Int pointLeft2Lines(Real A[2], Real B[2], Real C[2], Real P[2]);
-
+#ifdef __cplusplus
+}
+#endif
#endif
** 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: 2001/11/29 16:16:55 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompBot.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/sampleCompBot.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#include <stdlib.h>
{
oldLeftI = leftCorner-1;
oldRightI = rightCorner;
- leftMax = leftChain->getVertex(leftCorner)[0] - 1.0 ; //initilize to be left of leftCorner
+ leftMax = leftChain->getVertex(leftCorner)[0] - Real(1.0) ; //initilize to be left of leftCorner
rightMin = rightChain->getVertex(rightCorner)[0];
}
else //rightlower
oldLeftI = leftCorner;
oldRightI = rightCorner-1;
leftMax = leftChain->getVertex(leftCorner)[0];
- rightMin = rightChain->getVertex(rightCorner)[0] + 1.0;
+ rightMin = rightChain->getVertex(rightCorner)[0] + Real(1.0);
}
//i: the current working leftChain Index
** 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: 2001/11/29 16:16:55 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompTop.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/sampleCompTop.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#include <stdlib.h>
{
oldLeftI = leftEndIndex+1;
oldRightI = rightEndIndex;
- leftMax = leftChain->getVertex(leftEndIndex)[0] - 1.0; //initilza to left of leftU
+ leftMax = leftChain->getVertex(leftEndIndex)[0] - Real(1.0); //initilza to left of leftU
rightMin = rightChain->getVertex(rightEndIndex)[0];
}
else
oldLeftI = leftEndIndex;
oldRightI = rightEndIndex+1;
leftMax = leftChain->getVertex(leftEndIndex)[0];
- rightMin = rightChain->getVertex(rightEndIndex)[0] + 1.0;
+ rightMin = rightChain->getVertex(rightEndIndex)[0] + Real(1.0);
}
//i: the current working leftChain index,
//find l in [j, k-1] so that dec_chain[l][0] 0 is closest to
// inc_chain[i]
int l;
- Real tempI = j;
- Real tempMin = fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]);
+ Real tempI = Real(j);
+ Real tempMin = (Real)fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]);
for(l=j+1; l<= k-1; l++)
{
if(fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(l)[0])
<= tempMin)
{
- tempMin = fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(l)[0]);
- tempI = l;
+ tempMin = (Real)fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(l)[0]);
+ tempI = (Real)l;
}
}
//inc_chain[i] and dec_chain[tempI] are connected.
- monoTriangulationRecGenOpt(dec_chain->getVertex(tempI),
+ monoTriangulationRecGenOpt(dec_chain->getVertex((int)tempI),
botVertex,
inc_chain, i, inc_end,
dec_chain, (int)(tempI+1), dec_end,
//inc_chain[l][0] is the closet to dec_chain[j][0]
int tempI = i;
int l;
- Real tempMin = fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]);
+ Real tempMin = (Real)fabs(inc_chain->getVertex(i)[0] - dec_chain->getVertex(j)[0]);
for(l=i+1; l<=k-1; l++)
{
if(fabs(inc_chain->getVertex(l)[0] - dec_chain->getVertex(j)[0]) <= tempMin)
{
- tempMin = fabs(inc_chain->getVertex(l)[0] - dec_chain->getVertex(j)[0]);
+ tempMin = (Real)fabs(inc_chain->getVertex(l)[0] - dec_chain->getVertex(j)[0]);
tempI = l;
}
}
** 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: 2001/11/29 16:16:55 $ $Revision: 1.2 $
*/
/*
-** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampledLine.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/sampledLine.cc,v 1.2 2001/11/29 16:16:55 kschultz Exp $
*/
#include <stdlib.h>
sampledLine::sampledLine(Real pt1[2], Real pt2[2])
{
- int i;
npoints = 2;
points = (Real2*) malloc(sizeof(Real2) * 2);
assert(points);