-/* $Id: context.c,v 1.97 2000/10/28 18:34:48 brianp Exp $ */
+/* $Id: context.c,v 1.98 2000/10/29 19:02:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
cl->Type = GL_UNSIGNED_BYTE;
cl->Stride = 0;
cl->StrideB = 0;
- cl->Ptr = (void *) ctx->Current.ByteColor;
+ cl->Ptr = (void *) ctx->Current.Color;
cl->Enabled = 1;
cl = &ctx->Fallback.SecondaryColor;
ctx->Color.MultiDrawBuffer = GL_FALSE;
/* Current group */
- ASSIGN_4V( ctx->Current.ByteColor, CHAN_MAX, CHAN_MAX, CHAN_MAX, CHAN_MAX );
+ ASSIGN_4V( ctx->Current.Color, CHAN_MAX, CHAN_MAX, CHAN_MAX, CHAN_MAX );
ctx->Current.Index = 1;
for (i=0; i<MAX_TEXTURE_UNITS; i++)
ASSIGN_4V( ctx->Current.Texcoord[i], 0.0, 0.0, 0.0, 1.0 );
-/* $Id: drawpix.c,v 1.41 2000/10/29 18:12:15 brianp Exp $ */
+/* $Id: drawpix.c,v 1.42 2000/10/29 19:02:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
if (ctx->Current.RasterPosValid) {
GLfloat color[4];
GLfloat texcoord[4], invq;
- color[0] = CHAN_TO_FLOAT(ctx->Current.ByteColor[0]);
- color[1] = CHAN_TO_FLOAT(ctx->Current.ByteColor[1]);
- color[2] = CHAN_TO_FLOAT(ctx->Current.ByteColor[2]);
- color[3] = CHAN_TO_FLOAT(ctx->Current.ByteColor[3]);
+ color[0] = CHAN_TO_FLOAT(ctx->Current.Color[0]);
+ color[1] = CHAN_TO_FLOAT(ctx->Current.Color[1]);
+ color[2] = CHAN_TO_FLOAT(ctx->Current.Color[2]);
+ color[3] = CHAN_TO_FLOAT(ctx->Current.Color[3]);
invq = 1.0F / ctx->Current.Texcoord[0][3];
texcoord[0] = ctx->Current.Texcoord[0][0] * invq;
texcoord[1] = ctx->Current.Texcoord[0][1] * invq;
-/* $Id: enable.c,v 1.27 2000/10/27 16:44:40 keithw Exp $ */
+/* $Id: enable.c,v 1.28 2000/10/29 19:02:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
ctx->Light.ColorMaterialEnabled = state;
ctx->NewState |= NEW_LIGHTING;
if (state)
- gl_update_color_material( ctx, ctx->Current.ByteColor );
+ gl_update_color_material( ctx, ctx->Current.Color );
}
break;
case GL_CULL_FACE:
-/* $Id: get.c,v 1.37 2000/10/28 20:41:14 brianp Exp $ */
+/* $Id: get.c,v 1.38 2000/10/29 19:02:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
*params = ENUM_TO_BOOL(ctx->Polygon.CullFaceMode);
break;
case GL_CURRENT_COLOR:
- params[0] = INT_TO_BOOL(ctx->Current.ByteColor[0]);
- params[1] = INT_TO_BOOL(ctx->Current.ByteColor[1]);
- params[2] = INT_TO_BOOL(ctx->Current.ByteColor[2]);
- params[3] = INT_TO_BOOL(ctx->Current.ByteColor[3]);
+ params[0] = INT_TO_BOOL(ctx->Current.Color[0]);
+ params[1] = INT_TO_BOOL(ctx->Current.Color[1]);
+ params[2] = INT_TO_BOOL(ctx->Current.Color[2]);
+ params[3] = INT_TO_BOOL(ctx->Current.Color[3]);
break;
case GL_CURRENT_INDEX:
*params = INT_TO_BOOL(ctx->Current.Index);
*params = ENUM_TO_DOUBLE(ctx->Polygon.CullFaceMode);
break;
case GL_CURRENT_COLOR:
- params[0] = CHAN_TO_FLOAT(ctx->Current.ByteColor[0]);
- params[1] = CHAN_TO_FLOAT(ctx->Current.ByteColor[1]);
- params[2] = CHAN_TO_FLOAT(ctx->Current.ByteColor[2]);
- params[3] = CHAN_TO_FLOAT(ctx->Current.ByteColor[3]);
+ params[0] = CHAN_TO_FLOAT(ctx->Current.Color[0]);
+ params[1] = CHAN_TO_FLOAT(ctx->Current.Color[1]);
+ params[2] = CHAN_TO_FLOAT(ctx->Current.Color[2]);
+ params[3] = CHAN_TO_FLOAT(ctx->Current.Color[3]);
break;
case GL_CURRENT_INDEX:
*params = (GLdouble) ctx->Current.Index;
*params = ENUM_TO_FLOAT(ctx->Polygon.CullFaceMode);
break;
case GL_CURRENT_COLOR:
- params[0] = CHAN_TO_FLOAT(ctx->Current.ByteColor[0]);
- params[1] = CHAN_TO_FLOAT(ctx->Current.ByteColor[1]);
- params[2] = CHAN_TO_FLOAT(ctx->Current.ByteColor[2]);
- params[3] = CHAN_TO_FLOAT(ctx->Current.ByteColor[3]);
+ params[0] = CHAN_TO_FLOAT(ctx->Current.Color[0]);
+ params[1] = CHAN_TO_FLOAT(ctx->Current.Color[1]);
+ params[2] = CHAN_TO_FLOAT(ctx->Current.Color[2]);
+ params[3] = CHAN_TO_FLOAT(ctx->Current.Color[3]);
break;
case GL_CURRENT_INDEX:
*params = (GLfloat) ctx->Current.Index;
*params = (GLint) ctx->Polygon.CullFaceMode;
break;
case GL_CURRENT_COLOR:
- params[0] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.ByteColor[0] ) );
- params[1] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.ByteColor[1] ) );
- params[2] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.ByteColor[2] ) );
- params[3] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.ByteColor[3] ) );
+ params[0] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.Color[0] ) );
+ params[1] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.Color[1] ) );
+ params[2] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.Color[2] ) );
+ params[3] = FLOAT_TO_INT( CHAN_TO_FLOAT( ctx->Current.Color[3] ) );
break;
case GL_CURRENT_INDEX:
*params = (GLint) ctx->Current.Index;
-/* $Id: light.c,v 1.20 2000/10/28 20:41:14 brianp Exp $ */
+/* $Id: light.c,v 1.21 2000/10/29 19:02:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
}
if (ctx->Light.ColorMaterialEnabled)
- gl_update_color_material( ctx, ctx->Current.ByteColor );
+ gl_update_color_material( ctx, ctx->Current.Color );
}
-/* $Id: rastpos.c,v 1.10 2000/10/28 20:41:14 brianp Exp $ */
+/* $Id: rastpos.c,v 1.11 2000/10/29 19:02:23 brianp Exp $ */
/*
* Mesa 3-D graphics library
else {
/* use current color or index */
if (ctx->Visual.RGBAflag) {
- ctx->Current.RasterColor[0] = CHAN_TO_FLOAT(ctx->Current.ByteColor[0]);
- ctx->Current.RasterColor[1] = CHAN_TO_FLOAT(ctx->Current.ByteColor[1]);
- ctx->Current.RasterColor[2] = CHAN_TO_FLOAT(ctx->Current.ByteColor[2]);
- ctx->Current.RasterColor[3] = CHAN_TO_FLOAT(ctx->Current.ByteColor[3]);
+ ctx->Current.RasterColor[0] = CHAN_TO_FLOAT(ctx->Current.Color[0]);
+ ctx->Current.RasterColor[1] = CHAN_TO_FLOAT(ctx->Current.Color[1]);
+ ctx->Current.RasterColor[2] = CHAN_TO_FLOAT(ctx->Current.Color[2]);
+ ctx->Current.RasterColor[3] = CHAN_TO_FLOAT(ctx->Current.Color[3]);
}
else {
ctx->Current.RasterIndex = ctx->Current.Index;