summaryrefslogtreecommitdiff
path: root/src/mesa/swrast
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2001-03-07 05:06:11 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2001-03-07 05:06:11 +0000
commitb51b0a847d7e7daaea69f77ab569086ef81c24a2 (patch)
tree165cf8b023e6c7b1f66dacc46a6c37110ef27ea7 /src/mesa/swrast
parent249aebdd357d20f6326137c967c6b3923bef6c05 (diff)
fixed a bunch of g++ warnings/errors. Compiling with g++ can help find lots of potential problems
Diffstat (limited to 'src/mesa/swrast')
-rw-r--r--src/mesa/swrast/s_aaline.c6
-rw-r--r--src/mesa/swrast/s_aalinetemp.h8
-rw-r--r--src/mesa/swrast/s_aatriangle.c4
-rw-r--r--src/mesa/swrast/s_aatritemp.h4
-rw-r--r--src/mesa/swrast/s_accum.c26
-rw-r--r--src/mesa/swrast/s_buffers.c4
-rw-r--r--src/mesa/swrast/s_copypix.c4
-rw-r--r--src/mesa/swrast/s_depth.c12
-rw-r--r--src/mesa/swrast/s_drawpix.c46
-rw-r--r--src/mesa/swrast/s_fog.c4
-rw-r--r--src/mesa/swrast/s_pointtemp.h14
-rw-r--r--src/mesa/swrast/s_readpix.c5
-rw-r--r--src/mesa/swrast/s_stencil.c4
-rw-r--r--src/mesa/swrast/s_tritemp.h4
14 files changed, 74 insertions, 71 deletions
diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c
index ac368aa85b..cfaea45053 100644
--- a/src/mesa/swrast/s_aaline.c
+++ b/src/mesa/swrast/s_aaline.c
@@ -1,4 +1,4 @@
-/* $Id: s_aaline.c,v 1.4 2001/01/23 23:39:37 brianp Exp $ */
+/* $Id: s_aaline.c,v 1.5 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,7 +31,7 @@
#include "swrast/s_context.h"
#include "swrast/swrast.h"
#include "mtypes.h"
-
+#include "mmath.h"
#define SUB_PIXEL 4
@@ -170,7 +170,7 @@ solve_plane_chan(GLfloat x, GLfloat y, const GLfloat plane[4])
if (z < 0.0F)
return 0;
else if (z > CHAN_MAXF)
- return CHAN_MAXF;
+ return (GLchan) CHAN_MAXF;
return (GLchan) (GLint) z;
}
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h
index a98fbfd246..91d588eee0 100644
--- a/src/mesa/swrast/s_aalinetemp.h
+++ b/src/mesa/swrast/s_aalinetemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_aalinetemp.h,v 1.5 2001/01/29 23:38:41 brianp Exp $ */
+/* $Id: s_aalinetemp.h,v 1.6 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -41,7 +41,7 @@ NAME(plot)(GLcontext *ctx, const struct LineInfo *line,
const GLfloat fy = (GLfloat) iy;
const GLfloat coverage = compute_coveragef(line, ix, iy);
GLdepth z;
- GLfloat fog;
+ GLfixed fog;
GLchan red, green, blue, alpha;
GLint frac, indx, index;
GLchan specRed, specGreen, specBlue;
@@ -60,9 +60,9 @@ NAME(plot)(GLcontext *ctx, const struct LineInfo *line,
z = 0.0;
#endif
#ifdef DO_FOG
- fog = solve_plane(fx, fy, line->fPlane);
+ fog = FloatToFixed( solve_plane(fx, fy, line->fPlane) );
#else
- fog = 0.0;
+ fog = 0;
#endif
#ifdef DO_RGBA
red = solve_plane_chan(fx, fy, line->rPlane);
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index d9a11b0cf6..423318d093 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -1,4 +1,4 @@
-/* $Id: s_aatriangle.c,v 1.7 2001/02/16 18:14:41 keithw Exp $ */
+/* $Id: s_aatriangle.c,v 1.8 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -123,7 +123,7 @@ solve_plane_chan(GLfloat x, GLfloat y, const GLfloat plane[4])
if (z < 0.0F)
return 0;
else if (z > CHAN_MAXF)
- return CHAN_MAXF;
+ return (GLchan) CHAN_MAXF;
return (GLchan) (GLint) z;
}
diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h
index febc46f85d..26e1352c99 100644
--- a/src/mesa/swrast/s_aatritemp.h
+++ b/src/mesa/swrast/s_aatritemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_aatritemp.h,v 1.6 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_aatritemp.h,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -437,7 +437,7 @@
for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
if (ctx->Texture.Unit[unit]._ReallyEnabled) {
GLint j;
- for (j = 0; j < n; j++) {
+ for (j = 0; j < (GLint) n; j++) {
s[unit][j] = s[unit][j + left];
t[unit][j] = t[unit][j + left];
u[unit][j] = u[unit][j + left];
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index d7f7dd9e0d..0b8c611f6c 100644
--- a/src/mesa/swrast/s_accum.c
+++ b/src/mesa/swrast/s_accum.c
@@ -1,4 +1,4 @@
-/* $Id: s_accum.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_accum.c,v 1.6 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -276,7 +276,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
case GL_ADD:
if (value != 0.0F) {
const GLaccum intVal = (GLaccum) (value * acc_scale);
- GLuint j;
+ GLint j;
/* Leave optimized accum buffer mode */
if (swrast->_IntegerAccumMode)
rescale_accum(ctx);
@@ -293,7 +293,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
case GL_MULT:
if (value != 1.0F) {
- GLuint j;
+ GLint j;
/* Leave optimized accum buffer mode */
if (swrast->_IntegerAccumMode)
rescale_accum(ctx);
@@ -325,13 +325,13 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
if (swrast->_IntegerAccumMode) {
/* simply add integer color values into accum buffer */
- GLuint j;
+ GLint j;
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
assert(swrast->_IntegerAccumScaler > 0.0);
assert(swrast->_IntegerAccumScaler <= 1.0);
for (j = 0; j < height; j++) {
- GLuint i, i4;
+ GLint i, i4;
_mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i = i4 = 0; i < width; i++, i4+=4) {
acc[i4+0] += rgba[i][RCOMP];
@@ -349,10 +349,10 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
const GLfloat gscale = value * acc_scale / fChanMax;
const GLfloat bscale = value * acc_scale / fChanMax;
const GLfloat ascale = value * acc_scale / fChanMax;
- GLuint j;
+ GLint j;
for (j=0;j<height;j++) {
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
- GLuint i;
+ GLint i;
_mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i=0;i<width;i++) {
*acc += (GLaccum) ( (GLfloat) rgba[i][RCOMP] * rscale ); acc++;
@@ -390,12 +390,12 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
RENDER_START(ctx);
if (swrast->_IntegerAccumMode) {
/* just copy values into accum buffer */
- GLuint j;
+ GLint j;
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
assert(swrast->_IntegerAccumScaler > 0.0);
assert(swrast->_IntegerAccumScaler <= 1.0);
for (j = 0; j < height; j++) {
- GLuint i, i4;
+ GLint i, i4;
_mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i = i4 = 0; i < width; i++, i4 += 4) {
acc[i4+0] = rgba[i][RCOMP];
@@ -414,7 +414,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
const GLfloat bscale = value * acc_scale / fChanMax;
const GLfloat ascale = value * acc_scale / fChanMax;
const GLfloat d = 3.0 / acc_scale;
- GLuint i, j;
+ GLint i, j;
for (j = 0; j < height; j++) {
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
_mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
@@ -446,7 +446,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
static GLfloat prevMult = 0.0;
const GLfloat mult = swrast->_IntegerAccumScaler;
const GLint max = MIN2((GLint) (256 / mult), 32767);
- GLuint j;
+ GLint j;
if (mult != prevMult) {
for (j = 0; j < max; j++)
multTable[j] = (GLint) ((GLfloat) j * mult + 0.5F);
@@ -457,7 +457,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
assert(swrast->_IntegerAccumScaler <= 1.0);
for (j = 0; j < height; j++) {
const GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos*4;
- GLuint i, i4;
+ GLint i, i4;
for (i = i4 = 0; i < width; i++, i4 += 4) {
ASSERT(acc[i4+0] < max);
ASSERT(acc[i4+1] < max);
@@ -486,7 +486,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
const GLfloat gscale = value / acc_scale * fChanMax;
const GLfloat bscale = value / acc_scale * fChanMax;
const GLfloat ascale = value / acc_scale * fChanMax;
- GLuint i, j;
+ GLint i, j;
for (j=0;j<height;j++) {
const GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos*4;
for (i=0;i<width;i++) {
diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c
index c64bdccb3e..9dc01e8991 100644
--- a/src/mesa/swrast/s_buffers.c
+++ b/src/mesa/swrast/s_buffers.c
@@ -1,4 +1,4 @@
-/* $Id: s_buffers.c,v 1.5 2001/02/13 23:58:38 brianp Exp $ */
+/* $Id: s_buffers.c,v 1.6 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -124,7 +124,7 @@ clear_color_buffer(GLcontext *ctx)
else {
/* Color index mode */
ASSERT((ctx->Color.IndexMask & ((1 << ctx->Visual.indexBits) - 1))
- == ((1 << ctx->Visual.indexBits) - 1));
+ == (GLuint) ((1 << ctx->Visual.indexBits) - 1));
if (ctx->Visual.indexBits == 8) {
/* 8-bit clear */
GLubyte span[MAX_WIDTH];
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 22fcd3c2a8..7af64ff045 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -1,4 +1,4 @@
-/* $Id: s_copypix.c,v 1.13 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_copypix.c,v 1.14 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -430,7 +430,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
if (transferOps) {
const GLfloat scale = (1.0F / CHAN_MAXF);
GLfloat rgbaFloat[MAX_WIDTH][4];
- GLuint k;
+ GLint k;
/* convert chan to float */
for (k = 0; k < width; k++) {
rgbaFloat[k][RCOMP] = (GLfloat) rgba[k][RCOMP] * scale;
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 1266d31848..b051cdc489 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -1,4 +1,4 @@
-/* $Id: s_depth.c,v 1.6 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_depth.c,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1367,14 +1367,14 @@ _mesa_read_depth_span( GLcontext *ctx,
/* read from software depth buffer */
if (ctx->Visual.depthBits <= 16) {
const GLushort *zptr = Z_ADDRESS16( ctx, x, y );
- GLuint i;
+ GLint i;
for (i = 0; i < n; i++) {
depth[i] = zptr[i];
}
}
else {
const GLuint *zptr = Z_ADDRESS32( ctx, x, y );
- GLuint i;
+ GLint i;
for (i = 0; i < n; i++) {
depth[i] = zptr[i];
}
@@ -1439,14 +1439,14 @@ _mesa_read_depth_span_float( GLcontext *ctx,
/* read from software depth buffer */
if (ctx->Visual.depthBits <= 16) {
const GLushort *zptr = Z_ADDRESS16( ctx, x, y );
- GLuint i;
+ GLint i;
for (i = 0; i < n; i++) {
depth[i] = (GLfloat) zptr[i] * scale;
}
}
else {
const GLuint *zptr = Z_ADDRESS32( ctx, x, y );
- GLuint i;
+ GLint i;
for (i = 0; i < n; i++) {
depth[i] = (GLfloat) zptr[i] * scale;
}
@@ -1455,7 +1455,7 @@ _mesa_read_depth_span_float( GLcontext *ctx,
else if (ctx->Driver.ReadDepthSpan) {
/* read from hardware depth buffer */
GLdepth d[MAX_WIDTH];
- GLuint i;
+ GLint i;
assert(n <= MAX_WIDTH);
(*ctx->Driver.ReadDepthSpan)( ctx, n, x, y, d );
for (i = 0; i < n; i++) {
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 68caa3a23c..0943d31047 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: s_drawpix.c,v 1.11 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_drawpix.c,v 1.12 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -211,7 +211,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row=0; row<drawHeight; row++) {
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (void *) src, NULL);
+ (CONST GLchan (*)[4]) src, NULL);
src += rowLength * 4;
destY++;
}
@@ -222,7 +222,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
for (row=0; row<drawHeight; row++) {
destY--;
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (void *) src, NULL);
+ (CONST GLchan (*)[4]) src, NULL);
src += rowLength * 4;
}
}
@@ -231,7 +231,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row=0; row<drawHeight; row++) {
_mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) src, zoomY0);
+ zSpan, 0, (CONST GLchan (*)[4]) src, zoomY0);
src += rowLength * 4;
destY++;
}
@@ -248,7 +248,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row=0; row<drawHeight; row++) {
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
- (void *) src, NULL);
+ (CONST GLchan (*)[3]) src, NULL);
src += rowLength * 3;
destY++;
}
@@ -259,7 +259,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
for (row=0; row<drawHeight; row++) {
destY--;
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
- (void *) src, NULL);
+ (CONST GLchan (*)[3]) src, NULL);
src += rowLength * 3;
}
}
@@ -268,7 +268,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row=0; row<drawHeight; row++) {
_mesa_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) src, zoomY0);
+ zSpan, 0, (GLchan (*)[3]) src, zoomY0);
src += rowLength * 3;
destY++;
}
@@ -293,7 +293,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
rgb[i][2] = src[i];
}
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
- (void *) rgb, NULL);
+ (CONST GLchan (*)[3]) rgb, NULL);
src += rowLength;
destY++;
}
@@ -311,7 +311,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
}
destY--;
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
- (void *) rgb, NULL);
+ (CONST GLchan (*)[3]) rgb, NULL);
src += rowLength;
}
}
@@ -327,7 +327,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
rgb[i][2] = src[i];
}
_mesa_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) rgb, zoomY0);
+ zSpan, 0, (CONST GLchan (*)[3]) rgb, zoomY0);
src += rowLength;
destY++;
}
@@ -354,7 +354,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
rgba[i][3] = *ptr++;
}
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (void *) rgba, NULL);
+ (CONST GLchan (*)[4]) rgba, NULL);
src += rowLength*2;
destY++;
}
@@ -374,7 +374,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
}
destY--;
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (void *) rgba, NULL);
+ (CONST GLchan (*)[4]) rgba, NULL);
src += rowLength*2;
}
}
@@ -392,7 +392,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
rgba[i][3] = *ptr++;
}
_mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) rgba, zoomY0);
+ zSpan, 0, (CONST GLchan (*)[4]) rgba, zoomY0);
src += rowLength*2;
destY++;
}
@@ -426,7 +426,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
_mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
destY--;
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (const GLchan (*)[4]) rgba,
+ (CONST GLchan (*)[4]) rgba,
NULL);
src += rowLength;
}
@@ -439,7 +439,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
ASSERT(drawWidth < MAX_WIDTH);
_mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
_mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) rgba, zoomY0);
+ zSpan, 0, (CONST GLchan (*)[4]) rgba, zoomY0);
src += rowLength;
destY++;
}
@@ -631,8 +631,9 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row = 0; row < height; row++, y++) {
GLdepth zspan[MAX_WIDTH];
- const GLushort *zptr = _mesa_image_address(&ctx->Unpack,
- pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
+ const GLushort *zptr = (const GLushort *)
+ _mesa_image_address(&ctx->Unpack, pixels, width, height,
+ GL_DEPTH_COMPONENT, type, 0, row, 0);
GLint i;
for (i = 0; i < width; i++)
zspan[i] = zptr[i];
@@ -644,8 +645,9 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
/* Special case: directly write 32-bit depth values */
GLint row;
for (row = 0; row < height; row++, y++) {
- const GLuint *zptr = _mesa_image_address(&ctx->Unpack,
- pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
+ const GLuint *zptr = (const GLuint *)
+ _mesa_image_address(&ctx->Unpack, pixels, width, height,
+ GL_DEPTH_COMPONENT, type, 0, row, 0);
_mesa_write_rgba_span( ctx, width, x, y, zptr, 0, rgba, GL_BITMAP );
}
}
@@ -662,7 +664,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
/* clamp depth values to [0,1] and convert from floats to integers */
{
const GLfloat zs = ctx->DepthMaxF;
- GLuint i;
+ GLint i;
for (i = 0; i < drawWidth; i++) {
zspan[i] = (GLdepth) (fspan[i] * zs);
}
@@ -765,7 +767,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
for (row = 0; row < height; row++) {
const GLvoid *source = _mesa_image_address(unpack,
pixels, width, height, format, type, 0, row, 0);
- _mesa_unpack_float_color_span(ctx, width, GL_RGBA, (void *) dest,
+ _mesa_unpack_float_color_span(ctx, width, GL_RGBA, (GLfloat *) dest,
format, type, source, unpack,
transferOps & IMAGE_PRE_CONVOLUTION_BITS,
GL_FALSE);
@@ -801,7 +803,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
for (row = 0; row < height; row++, y++) {
const GLvoid *source = _mesa_image_address(unpack,
pixels, width, height, format, type, 0, row, 0);
- _mesa_unpack_chan_color_span(ctx, width, GL_RGBA, (void*) rgba,
+ _mesa_unpack_chan_color_span(ctx, width, GL_RGBA, (GLchan *) rgba,
format, type, source, unpack,
transferOps);
if ((ctx->Pixel.MinMaxEnabled && ctx->MinMax.Sink) ||
diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c
index 7c2d519173..debca659e4 100644
--- a/src/mesa/swrast/s_fog.c
+++ b/src/mesa/swrast/s_fog.c
@@ -1,4 +1,4 @@
-/* $Id: s_fog.c,v 1.9 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_fog.c,v 1.10 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -89,7 +89,7 @@ void
_mesa_fog_ci_pixels( const GLcontext *ctx,
GLuint n, const GLfixed fog[], GLuint index[] )
{
- GLuint idx = ctx->Fog.Index;
+ GLuint idx = (GLuint) ctx->Fog.Index;
GLuint i;
for (i=0;i<n;i++) {
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h
index da7ad0352e..60d7f45f14 100644
--- a/src/mesa/swrast/s_pointtemp.h
+++ b/src/mesa/swrast/s_pointtemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_pointtemp.h,v 1.3 2001/01/30 16:38:20 brianp Exp $ */
+/* $Id: s_pointtemp.h,v 1.4 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -200,10 +200,10 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
iRadius = iSize / 2;
if (iSize & 1) {
/* odd size */
- xmin = vert->win[0] - iRadius;
- xmax = vert->win[0] + iRadius;
- ymin = vert->win[1] - iRadius;
- ymax = vert->win[1] + iRadius;
+ xmin = (GLint) (vert->win[0] - iRadius);
+ xmax = (GLint) (vert->win[0] + iRadius);
+ ymin = (GLint) (vert->win[1] - iRadius);
+ ymax = (GLint) (vert->win[1] + iRadius);
}
else {
/* even size */
@@ -281,8 +281,8 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
{
/* size == 1 */
- GLint x = vert->win[0];
- GLint y = vert->win[1];
+ GLint x = (GLint) vert->win[0];
+ GLint y = (GLint) vert->win[1];
#if ((FLAGS & (SPECULAR | TEXTURE)) == (SPECULAR | TEXTURE))
PB_WRITE_MULTITEX_SPEC_PIXEL(PB, x, y, z, fog,
red, green, blue, alpha,
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 4ca5af4c8f..9ed58f4a63 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -1,4 +1,4 @@
-/* $Id: s_readpix.c,v 1.8 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_readpix.c,v 1.9 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -155,7 +155,8 @@ read_depth_pixels( GLcontext *ctx,
dest = _mesa_image_address(packing, pixels, width, height,
GL_DEPTH_COMPONENT, type, 0, j, 0);
- _mesa_pack_depth_span(ctx, readWidth, dest, type, depth, &ctx->Pack);
+ _mesa_pack_depth_span(ctx, readWidth, (GLdepth *) dest, type,
+ depth, &ctx->Pack);
}
}
}
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index a69bd3c96c..ac6f0dda4b 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -1,4 +1,4 @@
-/* $Id: s_stencil.c,v 1.8 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_stencil.c,v 1.9 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1260,7 +1260,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
GLint y;
for (y = 0; y < height; y++) {
GLstencil stencil[MAX_WIDTH];
- GLuint i;
+ GLint i;
(*ctx->Driver.ReadStencilSpan)(ctx, width, x, y, stencil);
for (i = 0; i < width; i++) {
stencil[i] = (stencil[i] & invMask) | clearVal;
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index 254907dea5..254f0fd2d2 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_tritemp.h,v 1.11 2001/03/03 00:37:27 brianp Exp $ */
+/* $Id: s_tritemp.h,v 1.12 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -725,7 +725,7 @@
# endif
}
{
- ffog = FloatToFixed(vLower->fog) * 256 + dfogdx * adjx + dfogdy * adjy + FIXED_HALF;
+ ffog = FloatToFixed(vLower->fog * 256 + dfogdx * adjx + dfogdy * adjy) + FIXED_HALF;
fdfogOuter = SignedFloatToFixed(dfogdy + dxOuter * dfogdx);
}
#endif