summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-03-08 15:23:46 +0000
committerBrian Paul <[email protected]>2001-03-08 15:23:46 +0000
commit01915e90e6912f06d43d443a09157f7bbc96ddc5 (patch)
treefc86ff76a45027c01d45902bed894d12f161088c
parenteac57f009ea347cfce0d70452c1bdeb0e6c9eeae (diff)
More g++ warning fixes. Fixes for CHAN_BITS==16, it seems to work.
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c48
-rw-r--r--src/mesa/drivers/x11/fakeglx.c4
-rw-r--r--src/mesa/drivers/x11/xfonts.c6
-rw-r--r--src/mesa/drivers/x11/xm_api.c7
-rw-r--r--src/mesa/main/colormac.h4
-rw-r--r--src/mesa/main/texobj.c6
-rw-r--r--src/mesa/math/m_debug_norm.c6
-rw-r--r--src/mesa/math/m_debug_xform.c4
-rw-r--r--src/mesa/swrast/s_accum.c6
-rw-r--r--src/mesa/swrast/s_blend.c24
-rw-r--r--src/mesa/swrast/s_drawpix.c4
-rw-r--r--src/mesa/swrast/s_texture.c12
-rw-r--r--src/mesa/swrast/s_triangle.c4
-rw-r--r--src/mesa/swrast_setup/ss_triangle.c4
-rw-r--r--src/mesa/swrast_setup/ss_vb.c3
-rw-r--r--src/mesa/swrast_setup/ss_vbtmp.h6
-rw-r--r--src/mesa/tnl/t_imm_elt.c4
-rw-r--r--src/mesa/tnl/t_imm_exec.c7
18 files changed, 85 insertions, 74 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index 6724c329fb3..5b3b9427807 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1,4 +1,4 @@
-/* $Id: osmesa.c,v 1.48 2001/03/03 20:33:29 brianp Exp $ */
+/* $Id: osmesa.c,v 1.49 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -145,10 +145,10 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
}
else if (format==OSMESA_RGBA) {
indexBits = 0;
- redBits = 8;
- greenBits = 8;
- blueBits = 8;
- alphaBits = 8;
+ redBits = CHAN_BITS;
+ greenBits = CHAN_BITS;
+ blueBits = CHAN_BITS;
+ alphaBits = CHAN_BITS;
rind = 0;
gind = 1;
bind = 2;
@@ -169,10 +169,10 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
}
else if (format==OSMESA_BGRA) {
indexBits = 0;
- redBits = 8;
- greenBits = 8;
- blueBits = 8;
- alphaBits = 8;
+ redBits = CHAN_BITS;
+ greenBits = CHAN_BITS;
+ blueBits = CHAN_BITS;
+ alphaBits = CHAN_BITS;
rind = 2;
gind = 1;
bind = 0;
@@ -193,10 +193,10 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
}
else if (format==OSMESA_ARGB) {
indexBits = 0;
- redBits = 8;
- greenBits = 8;
- blueBits = 8;
- alphaBits = 8;
+ redBits = CHAN_BITS;
+ greenBits = CHAN_BITS;
+ blueBits = CHAN_BITS;
+ alphaBits = CHAN_BITS;
rind = 1;
gind = 2;
bind = 3;
@@ -217,9 +217,9 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
}
else if (format==OSMESA_RGB) {
indexBits = 0;
- redBits = 8;
- greenBits = 8;
- blueBits = 8;
+ redBits = CHAN_BITS;
+ greenBits = CHAN_BITS;
+ blueBits = CHAN_BITS;
alphaBits = 0;
bshift = 0;
gshift = 8;
@@ -233,9 +233,9 @@ OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
}
else if (format==OSMESA_BGR) {
indexBits = 0;
- redBits = 8;
- greenBits = 8;
- blueBits = 8;
+ redBits = CHAN_BITS;
+ greenBits = CHAN_BITS;
+ blueBits = CHAN_BITS;
alphaBits = 0;
bshift = 0;
gshift = 8;
@@ -506,7 +506,7 @@ void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value )
*value = ctx->format;
return;
case OSMESA_TYPE:
- *value = GL_UNSIGNED_BYTE;
+ *value = CHAN_TYPE;
return;
case OSMESA_ROW_LENGTH:
*value = ctx->rowlength;
@@ -611,10 +611,10 @@ do { \
} while (0)
-#define UNPACK_RED(P) ( ((GLchan *) &(P))[osmesa->rInd] )
-#define UNPACK_GREEN(P) ( ((GLchan *) &(P))[osmesa->gInd] )
-#define UNPACK_BLUE(P) ( ((GLchan *) &(P))[osmesa->bInd] )
-#define UNPACK_ALPHA(P) ( ((GLchan *) &(P))[osmesa->aInd] )
+#define UNPACK_RED(P) ( (P)[osmesa->rInd] )
+#define UNPACK_GREEN(P) ( (P)[osmesa->gInd] )
+#define UNPACK_BLUE(P) ( (P)[osmesa->bInd] )
+#define UNPACK_ALPHA(P) ( (P)[osmesa->aInd] )
#define PIXELADDR1(X,Y) (osmesa->rowaddr[Y] + (X))
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 4e5d5acd49b..d3a36ec8f43 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1,4 +1,4 @@
-/* $Id: fakeglx.c,v 1.46 2001/02/17 00:17:31 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.47 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -2206,7 +2206,7 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
/* be sure our dispatch table size <= libGL's table */
{
- int size = sizeof(struct _glxapi_table) / sizeof(void *);
+ GLuint size = sizeof(struct _glxapi_table) / sizeof(void *);
(void) size;
assert(_glxapi_get_dispatch_table_size() >= size);
}
diff --git a/src/mesa/drivers/x11/xfonts.c b/src/mesa/drivers/x11/xfonts.c
index 3bb27a0c536..22f941a490f 100644
--- a/src/mesa/drivers/x11/xfonts.c
+++ b/src/mesa/drivers/x11/xfonts.c
@@ -1,4 +1,4 @@
-/* $Id: xfonts.c,v 1.12 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: xfonts.c,v 1.13 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -180,10 +180,10 @@ fill_bitmap (Display *dpy, Window win, GC gc,
* determine if a given glyph is valid and return the
* corresponding XCharStruct.
*/
-static XCharStruct *isvalid(XFontStruct *fs, int which)
+static XCharStruct *isvalid(XFontStruct *fs, unsigned int which)
{
unsigned int rows,pages;
- int byte1 = 0,byte2 = 0;
+ unsigned int byte1 = 0,byte2 = 0;
int i,valid = 1;
rows = fs->max_byte1 - fs->min_byte1 + 1;
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 8e1bd87517e..abbec2d7dd1 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1,4 +1,4 @@
-/* $Id: xm_api.c,v 1.17 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: xm_api.c,v 1.18 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -2237,7 +2237,8 @@ GLboolean XMesaSetFXmode( GLint mode )
static void FXgetImage( XMesaBuffer b )
{
static unsigned short pixbuf[MAX_WIDTH];
- int x, y;
+ GLuint x, y;
+ int xpos, ypos;
XMesaWindow root;
unsigned int bw, depth, width, height;
XMesaContext xmesa = (XMesaContext) b->xm_context->gl_ctx->DriverCtx;
@@ -2252,7 +2253,7 @@ static void FXgetImage( XMesaBuffer b )
depth = b->frontbuffer->depth;
#else
XGetGeometry( xmesa->xm_visual->display, b->frontbuffer,
- &root, &x, &y, &width, &height, &bw, &depth);
+ &root, &xpos, &ypos, &width, &height, &bw, &depth);
#endif
if (b->width != width || b->height != height) {
b->width = MIN2((int)width, xmesa->xm_buffer->FXctx->width);
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
index d26420132a9..c5c129eaa4f 100644
--- a/src/mesa/main/colormac.h
+++ b/src/mesa/main/colormac.h
@@ -1,4 +1,4 @@
-/* $Id: colormac.h,v 1.7 2001/03/07 03:20:38 brianp Exp $ */
+/* $Id: colormac.h,v 1.8 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -70,7 +70,7 @@
#define INT_TO_CHAN(i) ((i) < 0 ? 0 : (GLchan) ((i) >> 15))
#define UINT_TO_CHAN(i) ((GLchan) ((i) >> 16))
-#define CHAN_TO_FLOAT(c) ((GLfloat) ((c) * (1.0 / CHAN_MAXF) + 0.5F))
+#define CHAN_TO_FLOAT(c) ((GLfloat) ((c) * (1.0 / CHAN_MAXF)))
#define CLAMPED_FLOAT_TO_CHAN(c, f) \
c = ((GLchan) IROUND((f) * CHAN_MAXF))
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 3f0aa196c50..ca405bd78e7 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1,4 +1,4 @@
-/* $Id: texobj.c,v 1.42 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: texobj.c,v 1.43 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -214,8 +214,8 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
if (t->Dimensions == 6) {
/* make sure that all six cube map level 0 images are the same size */
- const GLint w = t->Image[baseLevel]->Width2;
- const GLint h = t->Image[baseLevel]->Height2;
+ const GLuint w = t->Image[baseLevel]->Width2;
+ const GLuint h = t->Image[baseLevel]->Height2;
if (!t->NegX[baseLevel] ||
t->NegX[baseLevel]->Width2 != w ||
t->NegX[baseLevel]->Height2 != h ||
diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c
index 55179ff01e7..9b7bafa7ca0 100644
--- a/src/mesa/math/m_debug_norm.c
+++ b/src/mesa/math/m_debug_norm.c
@@ -1,4 +1,4 @@
-/* $Id: m_debug_norm.c,v 1.3 2001/03/03 20:57:00 brianp Exp $ */
+/* $Id: m_debug_norm.c,v 1.4 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -124,7 +124,7 @@ static void ref_norm_transform_rescale( const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- int i;
+ GLuint i;
const GLfloat *s = in->start;
const GLfloat *m = mat->inv;
GLfloat (*out)[3] = (GLfloat (*)[3])dest->start;
@@ -149,7 +149,7 @@ static void ref_norm_transform_normalize( const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- int i;
+ GLuint i;
const GLfloat *s = in->start;
const GLfloat *m = mat->inv;
GLfloat (*out)[3] = (GLfloat (*)[3])dest->start;
diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c
index 8b26a233b43..dc81705acac 100644
--- a/src/mesa/math/m_debug_xform.c
+++ b/src/mesa/math/m_debug_xform.c
@@ -1,4 +1,4 @@
-/* $Id: m_debug_xform.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: m_debug_xform.c,v 1.4 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -136,7 +136,7 @@ static void ref_transform( GLvector4f *dst,
const GLubyte *clipmask,
const GLubyte flag )
{
- int i;
+ GLuint i;
GLfloat *s = (GLfloat *)src->start;
GLfloat (*d)[4] = (GLfloat (*)[4])dst->start;
const GLfloat *m = mat->m;
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index 0b8c611f6cb..0c1fdbe929f 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.6 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_accum.c,v 1.7 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -476,7 +476,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
if (ctx->DrawBuffer->UseSoftwareAlphaBuffers
&& ctx->Color.ColorMask[ACOMP]) {
_mesa_write_alpha_span(ctx, width, xpos, ypos,
- (CONST GLubyte (*)[4]) rgba, NULL);
+ (CONST GLchan (*)[4]) rgba, NULL);
}
ypos++;
}
@@ -508,7 +508,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
if (ctx->DrawBuffer->UseSoftwareAlphaBuffers
&& ctx->Color.ColorMask[ACOMP]) {
_mesa_write_alpha_span(ctx, width, xpos, ypos,
- (CONST GLubyte (*)[4]) rgba, NULL);
+ (CONST GLchan (*)[4]) rgba, NULL);
}
ypos++;
}
diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c
index bf23a870aba..d22616e36b5 100644
--- a/src/mesa/swrast/s_blend.c
+++ b/src/mesa/swrast/s_blend.c
@@ -1,4 +1,4 @@
-/* $Id: s_blend.c,v 1.4 2001/03/03 21:11:33 brianp Exp $ */
+/* $Id: s_blend.c,v 1.5 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -98,12 +98,20 @@ blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
const GLint b = DIV255(rgba[i][BCOMP] * t + dest[i][BCOMP] * s);
const GLint a = DIV255(rgba[i][ACOMP] * t + dest[i][ACOMP] * s);
#undef DIV255
-#else
- const GLint s = CHAN_MAX - t;
- const GLint r = (rgba[i][RCOMP] * t + dest[i][RCOMP] * s) / CHAN_MAX;
- const GLint g = (rgba[i][GCOMP] * t + dest[i][GCOMP] * s) / CHAN_MAX;
- const GLint b = (rgba[i][BCOMP] * t + dest[i][BCOMP] * s) / CHAN_MAX;
- const GLint a = (rgba[i][ACOMP] * t + dest[i][ACOMP] * s) / CHAN_MAX;
+#elif CHAN_BITS == 16
+ const GLfloat tt = (GLfloat) t / CHAN_MAXF;
+ const GLfloat s = 1.0 - tt;
+ const GLint r = (GLint) (rgba[i][RCOMP] * tt + dest[i][RCOMP] * s);
+ const GLint g = (GLint) (rgba[i][GCOMP] * tt + dest[i][GCOMP] * s);
+ const GLint b = (GLint) (rgba[i][BCOMP] * tt + dest[i][BCOMP] * s);
+ const GLint a = (GLint) (rgba[i][ACOMP] * tt + dest[i][ACOMP] * s);
+#else /* CHAN_BITS == 32 */
+ const GLfloat tt = (GLfloat) t / CHAN_MAXF;
+ const GLfloat s = 1.0 - tt;
+ const GLfloat r = rgba[i][RCOMP] * tt + dest[i][RCOMP] * s;
+ const GLfloat g = rgba[i][GCOMP] * tt + dest[i][GCOMP] * s;
+ const GLfloat b = rgba[i][BCOMP] * tt + dest[i][BCOMP] * s;
+ const GLfloat a = rgba[i][ACOMP] * tt + dest[i][ACOMP] * s;
#endif
#endif
ASSERT(r <= CHAN_MAX);
@@ -625,7 +633,7 @@ _mesa_blend_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
_mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest );
SWRAST_CONTEXT(ctx)->BlendFunc( ctx, n, mask, rgba,
- (const GLchan (*)[4])dest );
+ (const GLchan (*)[4]) dest );
}
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 0943d310474..1e03fa903e1 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.12 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_drawpix.c,v 1.13 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -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, (GLchan (*)[3]) src, zoomY0);
+ zSpan, 0, (CONST GLchan (*)[3]) src, zoomY0);
src += rowLength * 3;
destY++;
}
diff --git a/src/mesa/swrast/s_texture.c b/src/mesa/swrast/s_texture.c
index 7b1b4e94e3f..3a0da6e2531 100644
--- a/src/mesa/swrast/s_texture.c
+++ b/src/mesa/swrast/s_texture.c
@@ -1,4 +1,4 @@
-/* $Id: s_texture.c,v 1.14 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_texture.c,v 1.15 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -76,7 +76,7 @@
if (wrapMode == GL_CLAMP_TO_EDGE) { \
if (I0 < 0) \
I0 = 0; \
- if (I1 >= SIZE) \
+ if (I1 >= (GLint) SIZE) \
I1 = SIZE - 1; \
} \
} \
@@ -2441,10 +2441,10 @@ sample_depth_texture(const GLcontext *ctx,
j1 += texImage->Border;
}
else {
- if (i0 < 0 || i0 >= width) useBorderTexel |= I0BIT;
- if (i1 < 0 || i1 >= width) useBorderTexel |= I1BIT;
- if (j0 < 0 || j0 >= height) useBorderTexel |= J0BIT;
- if (j1 < 0 || j1 >= height) useBorderTexel |= J1BIT;
+ if (i0 < 0 || i0 >= (GLint) width) useBorderTexel |= I0BIT;
+ if (i1 < 0 || i1 >= (GLint) width) useBorderTexel |= I1BIT;
+ if (j0 < 0 || j0 >= (GLint) height) useBorderTexel |= J0BIT;
+ if (j1 < 0 || j1 >= (GLint) height) useBorderTexel |= J1BIT;
}
/* get four depth samples from the texture */
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 2baa2b5d29a..58609b0f40c 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -1,4 +1,4 @@
-/* $Id: s_triangle.c,v 1.15 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_triangle.c,v 1.16 2001/03/08 15:23:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -413,7 +413,7 @@ static void affine_textured_triangle( GLcontext *ctx,
return; \
} \
tbytesline = obj->Image[b]->Width * comp; \
- tsize = theight * tbytesline;
+ tsize = obj->Image[b]->Height * tbytesline;
/* Instead of defining a function for each mode, a test is done
diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c
index 2ea04ce0aac..ad44b1453fd 100644
--- a/src/mesa/swrast_setup/ss_triangle.c
+++ b/src/mesa/swrast_setup/ss_triangle.c
@@ -139,8 +139,8 @@ static void _swsetup_render_point_tri( GLcontext *ctx,
}
}
-#define SS_COLOR(a,b) COPY_4UBV(a,b)
-#define SS_SPEC(a,b) COPY_4UBV(a,b)
+#define SS_COLOR(a,b) COPY_CHAN4(a,b)
+#define SS_SPEC(a,b) COPY_CHAN4(a,b)
#define SS_IND(a,b) (a = b)
#define IND (0)
diff --git a/src/mesa/swrast_setup/ss_vb.c b/src/mesa/swrast_setup/ss_vb.c
index 266a9dfca49..d69f0ed8fcd 100644
--- a/src/mesa/swrast_setup/ss_vb.c
+++ b/src/mesa/swrast_setup/ss_vb.c
@@ -26,6 +26,7 @@
*/
#include "glheader.h"
+#include "colormac.h"
#include "macros.h"
#include "swrast/swrast.h"
@@ -201,7 +202,7 @@ rs_invalid( GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
void
_swsetup_vb_init( GLcontext *ctx )
{
- int i;
+ GLuint i;
(void) ctx;
for (i = 0 ; i < Elements(setup_func) ; i++)
diff --git a/src/mesa/swrast_setup/ss_vbtmp.h b/src/mesa/swrast_setup/ss_vbtmp.h
index 6197f5bdb56..8b6aaaecded 100644
--- a/src/mesa/swrast_setup/ss_vbtmp.h
+++ b/src/mesa/swrast_setup/ss_vbtmp.h
@@ -39,7 +39,7 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
GLfloat *fog;
GLfloat *pointSize;
GLuint tsz[MAX_TEXTURE_UNITS];
- int i;
+ GLuint i;
GLfloat *m = ctx->Viewport._WindowMap.m;
const GLfloat sx = m[0];
const GLfloat sy = m[5];
@@ -118,10 +118,10 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
}
if (IND & COLOR)
- COPY_4UBV(v->color, color[i]);
+ COPY_CHAN4(v->color, color[i]);
if (IND & SPEC)
- COPY_4UBV(v->specular, spec[i]);
+ COPY_CHAN4(v->specular, spec[i]);
if (IND & FOG)
v->fog = fog[i];
diff --git a/src/mesa/tnl/t_imm_elt.c b/src/mesa/tnl/t_imm_elt.c
index 497790d8887..6fe8f9aa141 100644
--- a/src/mesa/tnl/t_imm_elt.c
+++ b/src/mesa/tnl/t_imm_elt.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_elt.c,v 1.4 2001/02/20 18:28:52 keithw Exp $ */
+/* $Id: t_imm_elt.c,v 1.5 2001/03/08 15:23:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -705,7 +705,7 @@ static void _tnl_trans_elt_4f(GLfloat (*to)[4],
}
-static void _tnl_trans_elt_4chan(GLubyte (*to)[4],
+static void _tnl_trans_elt_4chan(GLchan (*to)[4],
const struct gl_client_array *from,
GLuint *flags,
GLuint *elts,
diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c
index 5de06521683..ff8cc00989d 100644
--- a/src/mesa/tnl/t_imm_exec.c
+++ b/src/mesa/tnl/t_imm_exec.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_exec.c,v 1.14 2001/03/03 20:33:31 brianp Exp $ */
+/* $Id: t_imm_exec.c,v 1.15 2001/03/08 15:23:47 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -29,6 +29,7 @@
#include "glheader.h"
+#include "colormac.h"
#include "context.h"
#include "enums.h"
#include "dlist.h"
@@ -104,7 +105,7 @@ void _tnl_copy_to_current( GLcontext *ctx, struct immediate *IM,
ctx->Current.EdgeFlag = IM->EdgeFlag[count];
if (flag & VERT_RGBA) {
- COPY_4UBV(ctx->Current.Color, IM->Color[count]);
+ COPY_CHAN4(ctx->Current.Color, IM->Color[count]);
if (ctx->Light.ColorMaterialEnabled) {
_mesa_update_color_material( ctx, ctx->Current.Color );
_mesa_validate_all_lighting_tables( ctx );
@@ -112,7 +113,7 @@ void _tnl_copy_to_current( GLcontext *ctx, struct immediate *IM,
}
if (flag & VERT_SPEC_RGB)
- COPY_4UBV(ctx->Current.SecondaryColor, IM->SecondaryColor[count]);
+ COPY_CHAN4(ctx->Current.SecondaryColor, IM->SecondaryColor[count]);
if (flag & VERT_FOG_COORD)
ctx->Current.FogCoord = IM->FogCoord[count];