-/* $Id: convolve.c,v 1.24 2001/05/09 22:24:22 brianp Exp $ */
+/* $Id: convolve.c,v 1.25 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
}
break;
case GL_CONVOLUTION_FILTER_SCALE:
- COPY_4V(ctx->Pixel.ConvolutionFilterScale[c], params);
+ /* COPY_4V(ctx->Pixel.ConvolutionFilterScale[c], params); */
+ /* need cast to prevent compiler warnings */
+ ctx->Pixel.ConvolutionFilterScale[c][0] = (GLfloat) params[0];
+ ctx->Pixel.ConvolutionFilterScale[c][1] = (GLfloat) params[1];
+ ctx->Pixel.ConvolutionFilterScale[c][2] = (GLfloat) params[2];
+ ctx->Pixel.ConvolutionFilterScale[c][3] = (GLfloat) params[3];
break;
case GL_CONVOLUTION_FILTER_BIAS:
- COPY_4V(ctx->Pixel.ConvolutionFilterBias[c], params);
+ /* COPY_4V(ctx->Pixel.ConvolutionFilterBias[c], params); */
+ /* need cast to prevent compiler warnings */
+ ctx->Pixel.ConvolutionFilterBias[c][0] = (GLfloat) params[0];
+ ctx->Pixel.ConvolutionFilterBias[c][1] = (GLfloat) params[1];
+ ctx->Pixel.ConvolutionFilterBias[c][2] = (GLfloat) params[2];
+ ctx->Pixel.ConvolutionFilterBias[c][3] = (GLfloat) params[3];
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(pname)");
-/* $Id: texstore.c,v 1.33 2001/07/23 16:07:12 brianp Exp $ */
+/* $Id: texstore.c,v 1.34 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
const GLchan (*rowA)[4] = (const GLchan (*)[4]) srcRowA;
const GLchan (*rowB)[4] = (const GLchan (*)[4]) srcRowB;
GLchan (*dst)[4] = (GLchan (*)[4]) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i][0] = (rowA[j][0] + rowA[k][0] +
rowB[j][0] + rowB[k][0]) / 4;
const GLchan (*rowA)[3] = (const GLchan (*)[3]) srcRowA;
const GLchan (*rowB)[3] = (const GLchan (*)[3]) srcRowB;
GLchan (*dst)[3] = (GLchan (*)[3]) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i][0] = (rowA[j][0] + rowA[k][0] +
rowB[j][0] + rowB[k][0]) / 4;
const GLchan *rowA = (const GLchan *) srcRowA;
const GLchan *rowB = (const GLchan *) srcRowB;
GLchan *dst = (GLchan *) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
}
const GLchan (*rowA)[2] = (const GLchan (*)[2]) srcRowA;
const GLchan (*rowB)[2] = (const GLchan (*)[2]) srcRowB;
GLchan (*dst)[2] = (GLchan (*)[2]) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i][0] = (rowA[j][0] + rowA[k][0] +
rowB[j][0] + rowB[k][0]) / 4;
const GLfloat *rowA = (const GLfloat *) srcRowA;
const GLfloat *rowB = (const GLfloat *) srcRowB;
GLfloat *dst = (GLfloat *) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) * 0.25F;
}
const GLubyte (*rowA)[4] = (const GLubyte (*)[4]) srcRowA;
const GLubyte (*rowB)[4] = (const GLubyte (*)[4]) srcRowB;
GLubyte (*dst)[4] = (GLubyte (*)[4]) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i][0] = (rowA[j][0] + rowA[k][0] +
rowB[j][0] + rowB[k][0]) / 4;
const GLubyte (*rowA)[3] = (const GLubyte (*)[3]) srcRowA;
const GLubyte (*rowB)[3] = (const GLubyte (*)[3]) srcRowB;
GLubyte (*dst)[3] = (GLubyte (*)[3]) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i][0] = (rowA[j][0] + rowA[k][0] +
rowB[j][0] + rowB[k][0]) / 4;
const GLushort *rowA = (const GLushort *) srcRowA;
const GLushort *rowB = (const GLushort *) srcRowB;
GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
const GLint rowAr0 = rowA[j] & 0x1f;
const GLint rowAr1 = rowA[k] & 0x1f;
const GLushort *rowA = (const GLushort *) srcRowA;
const GLushort *rowB = (const GLushort *) srcRowB;
GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
const GLint rowAr0 = rowA[j] & 0xf;
const GLint rowAr1 = rowA[k] & 0xf;
const GLushort *rowA = (const GLushort *) srcRowA;
const GLushort *rowB = (const GLushort *) srcRowB;
GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
const GLint rowAr0 = rowA[j] & 0x1f;
const GLint rowAr1 = rowA[k] & 0x1f;
const GLubyte (*rowA)[2] = (const GLubyte (*)[2]) srcRowA;
const GLubyte (*rowB)[2] = (const GLubyte (*)[2]) srcRowB;
GLubyte (*dst)[2] = (GLubyte (*)[2]) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i][0] = (rowA[j][0] + rowA[k][0] +
rowB[j][0] + rowB[k][0]) >> 2;
const GLubyte *rowA = (const GLubyte *) srcRowA;
const GLubyte *rowB = (const GLubyte *) srcRowB;
GLubyte *dst = (GLubyte *) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
const GLint rowAr0 = rowA[j] & 0x3;
const GLint rowAr1 = rowA[k] & 0x3;
const GLubyte *rowA = (const GLubyte *) srcRowA;
const GLubyte *rowB = (const GLubyte *) srcRowB;
GLubyte *dst = (GLubyte *) dstRow;
- for (i = j = 0, k = k0; i < dstWidth;
+ for (i = j = 0, k = k0; i < (GLuint) dstWidth;
i++, j += colStride, k += colStride) {
dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) >> 2;
}
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB,
0 };
const GLenum *targets;
- GLuint level;
+ GLint level;
GLint maxLevels = 0;
ASSERT(texObj);
-/* $Id: s_aalinetemp.h,v 1.13 2001/09/18 23:06:14 kschultz Exp $ */
+/* $Id: s_aalinetemp.h,v 1.14 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
#ifdef DO_INDEX
if (ctx->Light.ShadeModel == GL_SMOOTH) {
compute_plane(line.x0, line.y0, line.x1, line.y1,
- v0->index, v1->index, line.iPlane);
+ (GLfloat) v0->index, (GLfloat) v1->index, line.iPlane);
}
else {
- constant_plane(v1->index, line.iPlane);
+ constant_plane((GLfloat) v1->index, line.iPlane);
}
#endif
#ifdef DO_TEX
-/* $Id: s_aatriangle.c,v 1.18 2001/05/29 15:23:15 brianp Exp $ */
+/* $Id: s_aatriangle.c,v 1.19 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
if (rho2 == 0.0F)
return 0.0;
else
- return log(rho2) * 1.442695 * 0.5; /* 1.442695 = 1/log(2) */
+ return (GLfloat) (log(rho2) * 1.442695 * 0.5); /* 1.442695 = 1/log(2) */
}
-/* $Id: s_aatritemp.h,v 1.20 2001/07/13 20:12:44 brianp Exp $ */
+/* $Id: s_aatritemp.h,v 1.21 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
#endif
#ifdef DO_INDEX
if (ctx->Light.ShadeModel == GL_SMOOTH) {
- compute_plane(p0, p1, p2, v0->index,
- v1->index, v2->index, iPlane);
+ compute_plane(p0, p1, p2, (GLfloat) v0->index,
+ (GLfloat) v1->index, (GLfloat) v2->index, iPlane);
}
else {
- constant_plane(v2->index, iPlane);
+ constant_plane((GLfloat) v2->index, iPlane);
}
#endif
#ifdef DO_SPEC
-/* $Id: s_accum.c,v 1.12 2001/07/13 20:07:37 brianp Exp $ */
+/* $Id: s_accum.c,v 1.13 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const GLuint n = ctx->DrawBuffer->Width * ctx->DrawBuffer->Height * 4;
- const GLfloat s = swrast->_IntegerAccumScaler * (32767.0 / CHAN_MAXF);
+ const GLfloat s = swrast->_IntegerAccumScaler * (32767.0F / CHAN_MAXF);
GLaccum *accum = ctx->DrawBuffer->Accum;
GLuint i;
-/* $Id: s_feedback.c,v 1.8 2001/06/12 22:06:53 brianp Exp $ */
+/* $Id: s_feedback.c,v 1.9 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
win[0] = v->win[0];
win[1] = v->win[1];
win[2] = v->win[2] / ctx->DepthMaxF;
- win[3] = 1.0 / v->win[3];
+ win[3] = 1.0F / v->win[3];
color[0] = CHAN_TO_FLOAT(pv->color[0]);
color[1] = CHAN_TO_FLOAT(pv->color[1]);
-/* $Id: s_fog.c,v 1.13 2001/06/18 23:55:18 brianp Exp $ */
+/* $Id: s_fog.c,v 1.14 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
return CLAMP(f, 0.0F, 1.0F);
case GL_EXP:
d = ctx->Fog.Density;
- f = exp(-d * z);
+ f = (GLfloat) exp(-d * z);
return f;
case GL_EXP2:
d = ctx->Fog.Density;
- f = exp(-(d * d * z * z));
+ f = (GLfloat) exp(-(d * d * z * z));
return f;
default:
_mesa_problem(ctx, "Bad fog mode in make_fog_coord");
for (i = 0; i < n; i++) {
const GLfloat f = fog[i];
- const GLfloat g = 1.0 - f;
- rgba[i][RCOMP] = f * rgba[i][RCOMP] + g * rFog;
- rgba[i][GCOMP] = f * rgba[i][GCOMP] + g * gFog;
- rgba[i][BCOMP] = f * rgba[i][BCOMP] + g * bFog;
+ const GLfloat g = 1.0F - f;
+ rgba[i][RCOMP] = (GLchan) (f * rgba[i][RCOMP] + g * rFog);
+ rgba[i][GCOMP] = (GLchan) (f * rgba[i][GCOMP] + g * gFog);
+ rgba[i][BCOMP] = (GLchan) (f * rgba[i][BCOMP] + g * bFog);
}
}
GLuint i;
for (i = 0; i < n; i++) {
- const GLfloat f = CLAMP(fog[i], 0.0, 1.0);
+ const GLfloat f = CLAMP(fog[i], 0.0F, 1.0F);
index[i] = (GLuint) ((GLfloat) index[i] + (1.0F - f) * idx);
}
}
GLfloat eyez = (ndcz - p14) / p10;
if (eyez < 0.0)
eyez = -eyez;
- fogFact[i] = exp( -ctx->Fog.Density * eyez );
+ fogFact[i] = (GLfloat) exp( -ctx->Fog.Density * eyez );
}
}
else {
GLfloat eyez = p14 / (ndcz + p10);
if (eyez < 0.0)
eyez = -eyez;
- fogFact[i] = exp( -ctx->Fog.Density * eyez );
+ fogFact[i] = (GLfloat) exp( -ctx->Fog.Density * eyez );
}
}
break;
if (tmp < FLT_MIN_10_EXP)
tmp = FLT_MIN_10_EXP;
#endif
- fogFact[i] = exp( tmp );
+ fogFact[i] = (GLfloat) exp( tmp );
}
}
else {
if (tmp < FLT_MIN_10_EXP)
tmp = FLT_MIN_10_EXP;
#endif
- fogFact[i] = exp( tmp );
+ fogFact[i] = (GLfloat) exp( tmp );
}
}
}
-/* $Id: s_pointtemp.h,v 1.9 2001/07/19 16:12:03 brianp Exp $ */
+/* $Id: s_pointtemp.h,v 1.10 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
#if FLAGS & SPRITE
{
SWcontext *swctx = SWRAST_CONTEXT(ctx);
- const GLfloat radius = 0.5 * vert->pointSize; /* XXX threshold, alpha */
+ const GLfloat radius = 0.5F * vert->pointSize; /* XXX threshold, alpha */
SWvertex v0, v1, v2, v3;
GLuint unit;
#if FLAGS & SMOOTH
const GLfloat rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */
const GLfloat rmax = radius + 0.7071F;
- const GLfloat rmin2 = MAX2(0.0, rmin * rmin);
+ const GLfloat rmin2 = MAX2(0.0F, rmin * rmin);
const GLfloat rmax2 = rmax * rmax;
const GLfloat cscale = 1.0F / (rmax2 - rmin2);
const GLint xmin = (GLint) (vert->win[0] - radius);
-/* $Id: s_texture.c,v 1.38 2001/08/14 14:08:44 brianp Exp $ */
+/* $Id: s_texture.c,v 1.39 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
if (S <= 0.0F) \
U = 0.0F; \
else if (S >= 1.0F) \
- U = SIZE; \
+ U = (GLfloat) SIZE; \
else \
U = S * SIZE; \
U -= 0.5F; \
if (S <= 0.0F) \
U = 0.0F; \
else if (S >= 1.0F) \
- U = SIZE; \
+ U = (GLfloat) SIZE; \
else \
U = S * SIZE; \
U -= 0.5F; \
-/* $Id: s_triangle.c,v 1.37 2001/09/13 22:12:54 brianp Exp $ */
+/* $Id: s_triangle.c,v 1.38 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
for (i = 0; i < span->count; i++) { \
GLdouble invQ = tex_coord[2] ? \
(1.0 / tex_coord[2]) : 1.0; \
- GLfloat s_tmp = tex_coord[0] * invQ; \
- GLfloat t_tmp = tex_coord[1] * invQ; \
+ GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); \
+ GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); \
GLint s = IFLOOR(s_tmp) & info->smask; \
GLint t = IFLOOR(t_tmp) & info->tmask; \
GLint pos = (t << info->twidth_log2) + s; \
for (i = 0; i < span->count; i++) { \
GLdouble invQ = tex_coord[2] ? \
(1.0 / tex_coord[2]) : 1.0; \
- GLfloat s_tmp = tex_coord[0] * invQ; \
- GLfloat t_tmp = tex_coord[1] * invQ; \
+ GLfloat s_tmp = (GLfloat) (tex_coord[0] * invQ); \
+ GLfloat t_tmp = (GLfloat) (tex_coord[1] * invQ); \
GLfixed s_fix = FloatToFixed(s_tmp) - FIXED_HALF; \
GLfixed t_fix = FloatToFixed(t_tmp) - FIXED_HALF; \
GLint s = FixedToInt(FixedFloor(s_fix)) & info->smask; \
GLfloat q = span->tex[u][3];
GLuint i;
for (i = 0; i < span->count; i++) {
- const GLfloat invQ = (q == 0.0F) ? 1.0 : (1.0F / q);
+ const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q);
msTex[u][i] = s * invQ;
mtTex[u][i] = t * invQ;
mrTex[u][i] = r * invQ;
- mLambda[u][i] = log(span->rho[u] * invQ * invQ) * 1.442695F * 0.5F;
+ mLambda[u][i] = (GLfloat)
+ (log(span->rho[u] * invQ * invQ) * 1.442695F * 0.5F);
s += span->texStep[u][0];
t += span->texStep[u][1];
r += span->texStep[u][2];
GLfloat q = span->tex[u][3];
GLuint i;
for (i = 0; i < span->count; i++) {
- const GLfloat invQ = (q == 0.0F) ? 1.0 : (1.0F / q);
+ const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q);
msTex[u][i] = s * invQ;
mtTex[u][i] = t * invQ;
mrTex[u][i] = r * invQ;
GLfloat q = span->tex[0][3];
GLuint i;
for (i = 0; i < span->count; i++) {
- const GLfloat invQ = (q == 0.0F) ? 1.0 : (1.0F / q);
+ const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q);
sTex[i] = s * invQ;
tTex[i] = t * invQ;
rTex[i] = r * invQ;
- lambda[i] = log(span->rho[0] * invQ * invQ) * 1.442695F * 0.5F;
+ lambda[i] = (GLfloat)
+ (log(span->rho[0] * invQ * invQ) * 1.442695F * 0.5F);
s += span->texStep[0][0];
t += span->texStep[0][1];
r += span->texStep[0][2];
GLfloat q = span->tex[0][3];
GLuint i;
for (i = 0; i < span->count; i++) {
- const GLfloat invQ = (q == 0.0F) ? 1.0 : (1.0F / q);
+ const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q);
sTex[i] = s * invQ;
tTex[i] = t * invQ;
rTex[i] = r * invQ;
span.green += span.greenStep; \
span.blue += span.blueStep; \
span.alpha += span.alphaStep; \
- sSpan[i] = span.tex[0][0] * invQ; \
- tSpan[i] = span.tex[0][1] * invQ; \
- uSpan[i] = span.tex[0][2] * invQ; \
+ sSpan[i] = (GLfloat) (span.tex[0][0] * invQ); \
+ tSpan[i] = (GLfloat) (span.tex[0][1] * invQ); \
+ uSpan[i] = (GLfloat) (span.tex[0][2] * invQ); \
span.tex[0][0] += span.texStep[0][0]; \
span.tex[0][1] += span.texStep[0][1]; \
span.tex[0][2] += span.texStep[0][2]; \
-/* $Id: s_tritemp.h,v 1.26 2001/09/13 22:12:54 brianp Exp $ */
+/* $Id: s_tritemp.h,v 1.27 2001/09/19 20:30:44 kschultz Exp $ */
/*
* Mesa 3-D graphics library
# ifdef INTERP_ALPHA
GLfloat eMaj_da, eBot_da;
# endif
- eMaj_dr = (GLint) vMax->color[RCOMP] - (GLint) vMin->color[RCOMP];
- eBot_dr = (GLint) vMid->color[RCOMP] - (GLint) vMin->color[RCOMP];
+ eMaj_dr = (GLfloat) ((GLint) vMax->color[RCOMP] -
+ (GLint) vMin->color[RCOMP]);
+ eBot_dr = (GLfloat) ((GLint) vMid->color[RCOMP] -
+ (GLint) vMin->color[RCOMP]);
drdx = oneOverArea * (eMaj_dr * eBot.dy - eMaj.dy * eBot_dr);
span.redStep = SignedFloatToFixed(drdx);
drdy = oneOverArea * (eMaj.dx * eBot_dr - eMaj_dr * eBot.dx);
- eMaj_dg = (GLint) vMax->color[GCOMP] - (GLint) vMin->color[GCOMP];
- eBot_dg = (GLint) vMid->color[GCOMP] - (GLint) vMin->color[GCOMP];
+ eMaj_dg = (GLfloat) ((GLint) vMax->color[GCOMP] -
+ (GLint) vMin->color[GCOMP]);
+ eBot_dg = (GLfloat) ((GLint) vMid->color[GCOMP] -
+ (GLint) vMin->color[GCOMP]);
dgdx = oneOverArea * (eMaj_dg * eBot.dy - eMaj.dy * eBot_dg);
span.greenStep = SignedFloatToFixed(dgdx);
dgdy = oneOverArea * (eMaj.dx * eBot_dg - eMaj_dg * eBot.dx);
- eMaj_db = (GLint) vMax->color[BCOMP] - (GLint) vMin->color[BCOMP];
- eBot_db = (GLint) vMid->color[BCOMP] - (GLint) vMin->color[BCOMP];
+ eMaj_db = (GLfloat) ((GLint) vMax->color[BCOMP] -
+ (GLint) vMin->color[BCOMP]);
+ eBot_db = (GLfloat) ((GLint) vMid->color[BCOMP] -
+ (GLint) vMin->color[BCOMP]);
dbdx = oneOverArea * (eMaj_db * eBot.dy - eMaj.dy * eBot_db);
span.blueStep = SignedFloatToFixed(dbdx);
dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx);
# ifdef INTERP_ALPHA
- eMaj_da = (GLint) vMax->color[ACOMP] - (GLint) vMin->color[ACOMP];
- eBot_da = (GLint) vMid->color[ACOMP] - (GLint) vMin->color[ACOMP];
+ eMaj_da = (GLfloat) ((GLint) vMax->color[ACOMP] -
+ (GLint) vMin->color[ACOMP]);
+ eBot_da = (GLfloat) ((GLint) vMid->color[ACOMP] -
+ (GLint) vMin->color[ACOMP]);
dadx = oneOverArea * (eMaj_da * eBot.dy - eMaj.dy * eBot_da);
span.alphaStep = SignedFloatToFixed(dadx);
dady = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx);
GLfloat eMaj_dsr, eBot_dsr;
GLfloat eMaj_dsg, eBot_dsg;
GLfloat eMaj_dsb, eBot_dsb;
- eMaj_dsr = (GLint) vMax->specular[RCOMP] - (GLint) vMin->specular[RCOMP];
- eBot_dsr = (GLint) vMid->specular[RCOMP] - (GLint) vMin->specular[RCOMP];
+ eMaj_dsr = (GLfloat) ((GLint) vMax->specular[RCOMP] -
+ (GLint) vMin->specular[RCOMP]);
+ eBot_dsr = (GLfloat) ((GLint) vMid->specular[RCOMP] -
+ (GLint) vMin->specular[RCOMP]);
dsrdx = oneOverArea * (eMaj_dsr * eBot.dy - eMaj.dy * eBot_dsr);
span.specRedStep = SignedFloatToFixed(dsrdx);
dsrdy = oneOverArea * (eMaj.dx * eBot_dsr - eMaj_dsr * eBot.dx);
- eMaj_dsg = (GLint) vMax->specular[GCOMP] - (GLint) vMin->specular[GCOMP];
- eBot_dsg = (GLint) vMid->specular[GCOMP] - (GLint) vMin->specular[GCOMP];
+ eMaj_dsg = (GLfloat) ((GLint) vMax->specular[GCOMP] -
+ (GLint) vMin->specular[GCOMP]);
+ eBot_dsg = (GLfloat) ((GLint) vMid->specular[GCOMP] -
+ (GLint) vMin->specular[GCOMP]);
dsgdx = oneOverArea * (eMaj_dsg * eBot.dy - eMaj.dy * eBot_dsg);
span.specGreenStep = SignedFloatToFixed(dsgdx);
dsgdy = oneOverArea * (eMaj.dx * eBot_dsg - eMaj_dsg * eBot.dx);
- eMaj_dsb = (GLint) vMax->specular[BCOMP] - (GLint) vMin->specular[BCOMP];
- eBot_dsb = (GLint) vMid->specular[BCOMP] - (GLint) vMin->specular[BCOMP];
+ eMaj_dsb = (GLfloat) ((GLint) vMax->specular[BCOMP] -
+ (GLint) vMin->specular[BCOMP]);
+ eBot_dsb = (GLfloat) ((GLint) vMid->specular[BCOMP] -
+ (GLint) vMin->specular[BCOMP]);
dsbdx = oneOverArea * (eMaj_dsb * eBot.dy - eMaj.dy * eBot_dsb);
span.specBlueStep = SignedFloatToFixed(dsbdx);
dsbdy = oneOverArea * (eMaj.dx * eBot_dsb - eMaj_dsb * eBot.dx);
span.activeMask |= SPAN_INDEX;
if (ctx->Light.ShadeModel == GL_SMOOTH) {
GLfloat eMaj_di, eBot_di;
- eMaj_di = (GLint) vMax->index - (GLint) vMin->index;
- eBot_di = (GLint) vMid->index - (GLint) vMin->index;
+ eMaj_di = (GLfloat) ((GLint) vMax->index - (GLint) vMin->index);
+ eBot_di = (GLfloat) ((GLint) vMid->index - (GLint) vMin->index);
didx = oneOverArea * (eMaj_di * eBot.dy - eMaj.dy * eBot_di);
span.indexStep = SignedFloatToFixed(didx);
didy = oneOverArea * (eMaj.dx * eBot_di - eMaj_di * eBot.dx);