summaryrefslogtreecommitdiffstats
path: root/src/glu/sgi/libnurbs/interface
diff options
context:
space:
mode:
authorKarl Schultz <[email protected]>2001-11-29 16:16:55 +0000
committerKarl Schultz <[email protected]>2001-11-29 16:16:55 +0000
commit9c8cbe6950096c4ec2fd1963edbc6c993c86947f (patch)
tree3dcf4a5d511c59e94f25740afb028ca5e7fca8ca /src/glu/sgi/libnurbs/interface
parent4e6c835210bd0e8e8467a1c75723af6af4b41fb4 (diff)
Fix compilation errors and warnings for NURBS support. (Robert Bergkvist)
Diffstat (limited to 'src/glu/sgi/libnurbs/interface')
-rw-r--r--src/glu/sgi/libnurbs/interface/bezierEval.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/glu/sgi/libnurbs/interface/bezierEval.cc b/src/glu/sgi/libnurbs/interface/bezierEval.cc
index 3f086c0c32e..a1bbbf52a78 100644
--- a/src/glu/sgi/libnurbs/interface/bezierEval.cc
+++ b/src/glu/sgi/libnurbs/interface/bezierEval.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: 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>
@@ -72,8 +72,8 @@ void bezierCurveEval(float u0, float u1, int order, float *ctlpoints, int stride
{
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++)
@@ -171,7 +171,7 @@ void bezierCurveEvalDerGen(int der, float u0, float u1, int order, float *ctlpoi
*/
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++){
@@ -229,7 +229,7 @@ void bezierSurfEvalNormal(float u0, float u1, int uorder, float v0, float v1, in
/*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)
{