diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/api_noop.c | 126 | ||||
-rw-r--r-- | src/mesa/main/context.c | 24 | ||||
-rw-r--r-- | src/mesa/main/drawpix.c | 13 | ||||
-rw-r--r-- | src/mesa/main/get.c | 60 | ||||
-rw-r--r-- | src/mesa/main/light.c | 10 | ||||
-rw-r--r-- | src/mesa/main/light.h | 4 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 12 | ||||
-rw-r--r-- | src/mesa/main/rastpos.c | 10 |
8 files changed, 135 insertions, 124 deletions
diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c index b8d191faeae..58a6e7d7712 100644 --- a/src/mesa/main/api_noop.c +++ b/src/mesa/main/api_noop.c @@ -1,4 +1,4 @@ -/* $Id: api_noop.c,v 1.7 2001/03/20 18:35:23 gareth Exp $ */ +/* $Id: api_noop.c,v 1.8 2001/04/28 08:39:17 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -155,85 +155,81 @@ void _mesa_noop_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) void _mesa_noop_Color4ub( GLubyte a, GLubyte b, GLubyte c, GLubyte d ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.Color; - color[0] = UBYTE_TO_CHAN(a); - color[1] = UBYTE_TO_CHAN(b); - color[2] = UBYTE_TO_CHAN(c); - color[3] = UBYTE_TO_CHAN(d); + GLfloat *color = ctx->Current.Color; + color[0] = UBYTE_TO_FLOAT(a); + color[1] = UBYTE_TO_FLOAT(b); + color[2] = UBYTE_TO_FLOAT(c); + color[3] = UBYTE_TO_FLOAT(d); } void _mesa_noop_Color4ubv( const GLubyte *v ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.Color; -#if CHAN_TYPE == GL_UNSIGNED_BYTE - COPY_4UBV( color, v ); -#else - color[0] = UBYTE_TO_CHAN(v[0]); - color[1] = UBYTE_TO_CHAN(v[1]); - color[2] = UBYTE_TO_CHAN(v[2]); - color[3] = UBYTE_TO_CHAN(v[3]); -#endif + GLfloat *color = ctx->Current.Color; + color[0] = UBYTE_TO_FLOAT(v[0]); + color[1] = UBYTE_TO_FLOAT(v[1]); + color[2] = UBYTE_TO_FLOAT(v[2]); + color[3] = UBYTE_TO_FLOAT(v[3]); } void _mesa_noop_Color4f( GLfloat a, GLfloat b, GLfloat c, GLfloat d ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.Color; - UNCLAMPED_FLOAT_TO_CHAN(color[0], a); - UNCLAMPED_FLOAT_TO_CHAN(color[1], b); - UNCLAMPED_FLOAT_TO_CHAN(color[2], c); - UNCLAMPED_FLOAT_TO_CHAN(color[3], d); + GLfloat *color = ctx->Current.Color; + color[0] = a; + color[1] = b; + color[2] = c; + color[3] = d; } void _mesa_noop_Color4fv( const GLfloat *v ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.Color; - UNCLAMPED_FLOAT_TO_CHAN(color[0], v[0]); - UNCLAMPED_FLOAT_TO_CHAN(color[1], v[1]); - UNCLAMPED_FLOAT_TO_CHAN(color[2], v[2]); - UNCLAMPED_FLOAT_TO_CHAN(color[3], v[3]); + GLfloat *color = ctx->Current.Color; + color[0] = v[0]; + color[1] = v[1]; + color[2] = v[2]; + color[3] = v[3]; } void _mesa_noop_Color3ub( GLubyte a, GLubyte b, GLubyte c ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.Color; - color[0] = UBYTE_TO_CHAN(a); - color[1] = UBYTE_TO_CHAN(b); - color[2] = UBYTE_TO_CHAN(c); - color[3] = CHAN_MAX; + GLfloat *color = ctx->Current.Color; + color[0] = UBYTE_TO_FLOAT(a); + color[1] = UBYTE_TO_FLOAT(b); + color[2] = UBYTE_TO_FLOAT(c); + color[3] = 1.0; } void _mesa_noop_Color3ubv( const GLubyte *v ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.Color; - color[0] = UBYTE_TO_CHAN(v[0]); - color[1] = UBYTE_TO_CHAN(v[1]); - color[2] = UBYTE_TO_CHAN(v[2]); - color[3] = CHAN_MAX; + GLfloat *color = ctx->Current.Color; + color[0] = UBYTE_TO_FLOAT(v[0]); + color[1] = UBYTE_TO_FLOAT(v[1]); + color[2] = UBYTE_TO_FLOAT(v[2]); + color[3] = 1.0; } void _mesa_noop_Color3f( GLfloat a, GLfloat b, GLfloat c ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.Color; - UNCLAMPED_FLOAT_TO_CHAN(color[0], a); - UNCLAMPED_FLOAT_TO_CHAN(color[1], b); - UNCLAMPED_FLOAT_TO_CHAN(color[2], c); - color[3] = CHAN_MAX; + GLfloat *color = ctx->Current.Color; + color[0] = a; + color[1] = b; + color[2] = c; + color[3] = 1.0; } void _mesa_noop_Color3fv( const GLfloat *v ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.Color; - UNCLAMPED_FLOAT_TO_CHAN(color[0], v[0]); - UNCLAMPED_FLOAT_TO_CHAN(color[1], v[1]); - UNCLAMPED_FLOAT_TO_CHAN(color[2], v[2]); - color[3] = CHAN_MAX; + GLfloat *color = ctx->Current.Color; + color[0] = v[0]; + color[1] = v[1]; + color[2] = v[2]; + color[3] = 1.0; } void _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a ) @@ -376,41 +372,41 @@ void _mesa_noop_MultiTexCoord4fvARB( GLenum target, GLfloat *v ) void _mesa_noop_SecondaryColor3ubEXT( GLubyte a, GLubyte b, GLubyte c ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.SecondaryColor; - color[0] = UBYTE_TO_CHAN(a); - color[1] = UBYTE_TO_CHAN(b); - color[2] = UBYTE_TO_CHAN(c); - color[3] = CHAN_MAX; + GLfloat *color = ctx->Current.SecondaryColor; + color[0] = UBYTE_TO_FLOAT(a); + color[1] = UBYTE_TO_FLOAT(b); + color[2] = UBYTE_TO_FLOAT(c); + color[3] = 1.0; } void _mesa_noop_SecondaryColor3ubvEXT( const GLubyte *v ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.SecondaryColor; - color[0] = UBYTE_TO_CHAN(v[0]); - color[1] = UBYTE_TO_CHAN(v[1]); - color[2] = UBYTE_TO_CHAN(v[2]); - color[3] = CHAN_MAX; + GLfloat *color = ctx->Current.SecondaryColor; + color[0] = UBYTE_TO_FLOAT(v[0]); + color[1] = UBYTE_TO_FLOAT(v[1]); + color[2] = UBYTE_TO_FLOAT(v[2]); + color[3] = 1.0; } void _mesa_noop_SecondaryColor3fEXT( GLfloat a, GLfloat b, GLfloat c ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.SecondaryColor; - UNCLAMPED_FLOAT_TO_CHAN(color[0], a); - UNCLAMPED_FLOAT_TO_CHAN(color[1], b); - UNCLAMPED_FLOAT_TO_CHAN(color[2], c); - color[3] = CHAN_MAX; + GLfloat *color = ctx->Current.SecondaryColor; + color[0] = a; + color[1] = b; + color[2] = c; + color[3] = 1.0; } void _mesa_noop_SecondaryColor3fvEXT( const GLfloat *v ) { GET_CURRENT_CONTEXT(ctx); - GLchan *color = ctx->Current.SecondaryColor; - UNCLAMPED_FLOAT_TO_CHAN(color[0], v[0]); - UNCLAMPED_FLOAT_TO_CHAN(color[1], v[1]); - UNCLAMPED_FLOAT_TO_CHAN(color[2], v[2]); - color[3] = CHAN_MAX; + GLfloat *color = ctx->Current.SecondaryColor; + color[0] = v[0]; + color[1] = v[1]; + color[2] = v[2]; + color[3] = 1.0; } void _mesa_noop_TexCoord1f( GLfloat a ) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 87a9749d588..948de1b330f 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.134 2001/04/27 21:17:20 brianp Exp $ */ +/* $Id: context.c,v 1.135 2001/04/28 08:39:17 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -817,7 +817,7 @@ init_attrib_groups( GLcontext *ctx ) ctx->Color.MultiDrawBuffer = GL_FALSE; /* Current group */ - ASSIGN_4V( ctx->Current.Color, CHAN_MAX, CHAN_MAX, CHAN_MAX, CHAN_MAX ); + ASSIGN_4V( ctx->Current.Color, 1.0, 1.0, 1.0, 1.0 ); 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 ); @@ -1156,22 +1156,40 @@ init_attrib_groups( GLcontext *ctx ) ctx->Array.Vertex.StrideB = 0; ctx->Array.Vertex.Ptr = NULL; ctx->Array.Vertex.Enabled = GL_FALSE; + ctx->Array.Vertex.Flags = CA_CLIENT_DATA; ctx->Array.Normal.Type = GL_FLOAT; ctx->Array.Normal.Stride = 0; ctx->Array.Normal.StrideB = 0; ctx->Array.Normal.Ptr = NULL; ctx->Array.Normal.Enabled = GL_FALSE; + ctx->Array.Normal.Flags = CA_CLIENT_DATA; ctx->Array.Color.Size = 4; ctx->Array.Color.Type = GL_FLOAT; ctx->Array.Color.Stride = 0; ctx->Array.Color.StrideB = 0; ctx->Array.Color.Ptr = NULL; ctx->Array.Color.Enabled = GL_FALSE; + ctx->Array.Color.Flags = CA_CLIENT_DATA; + ctx->Array.SecondaryColor.Size = 4; + ctx->Array.SecondaryColor.Type = GL_FLOAT; + ctx->Array.SecondaryColor.Stride = 0; + ctx->Array.SecondaryColor.StrideB = 0; + ctx->Array.SecondaryColor.Ptr = NULL; + ctx->Array.SecondaryColor.Enabled = GL_FALSE; + ctx->Array.SecondaryColor.Flags = CA_CLIENT_DATA; + ctx->Array.FogCoord.Size = 1; + ctx->Array.FogCoord.Type = GL_FLOAT; + ctx->Array.FogCoord.Stride = 0; + ctx->Array.FogCoord.StrideB = 0; + ctx->Array.FogCoord.Ptr = NULL; + ctx->Array.FogCoord.Enabled = GL_FALSE; + ctx->Array.FogCoord.Flags = CA_CLIENT_DATA; ctx->Array.Index.Type = GL_FLOAT; ctx->Array.Index.Stride = 0; ctx->Array.Index.StrideB = 0; ctx->Array.Index.Ptr = NULL; ctx->Array.Index.Enabled = GL_FALSE; + ctx->Array.Index.Flags = CA_CLIENT_DATA; for (i = 0; i < MAX_TEXTURE_UNITS; i++) { ctx->Array.TexCoord[i].Size = 4; ctx->Array.TexCoord[i].Type = GL_FLOAT; @@ -1179,12 +1197,14 @@ init_attrib_groups( GLcontext *ctx ) ctx->Array.TexCoord[i].StrideB = 0; ctx->Array.TexCoord[i].Ptr = NULL; ctx->Array.TexCoord[i].Enabled = GL_FALSE; + ctx->Array.TexCoord[i].Flags = CA_CLIENT_DATA; } ctx->Array.TexCoordInterleaveFactor = 1; ctx->Array.EdgeFlag.Stride = 0; ctx->Array.EdgeFlag.StrideB = 0; ctx->Array.EdgeFlag.Ptr = NULL; ctx->Array.EdgeFlag.Enabled = GL_FALSE; + ctx->Array.EdgeFlag.Flags = CA_CLIENT_DATA; ctx->Array.ActiveTexture = 0; /* GL_ARB_multitexture */ /* Pixel transfer */ diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c index d46ace0a655..e51f8369a1e 100644 --- a/src/mesa/main/drawpix.c +++ b/src/mesa/main/drawpix.c @@ -1,4 +1,4 @@ -/* $Id: drawpix.c,v 1.52 2001/04/10 15:25:45 brianp Exp $ */ +/* $Id: drawpix.c,v 1.53 2001/04/28 08:39:17 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -73,14 +73,9 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, } else if (ctx->RenderMode==GL_FEEDBACK) { if (ctx->Current.RasterPosValid) { - GLfloat color[4]; GLfloat texcoord[4], invq; FLUSH_CURRENT(ctx, 0); - 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; @@ -88,8 +83,10 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, texcoord[3] = ctx->Current.Texcoord[0][3]; FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_DRAW_PIXEL_TOKEN ); _mesa_feedback_vertex( ctx, - ctx->Current.RasterPos, - color, ctx->Current.Index, texcoord ); + ctx->Current.RasterPos, + ctx->Current.Color, + ctx->Current.Index, + texcoord ); } } else if (ctx->RenderMode==GL_SELECT) { diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index c721bd4bfd9..26a0de03b73 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1,4 +1,4 @@ -/* $Id: get.c,v 1.57 2001/03/18 08:53:49 gareth Exp $ */ +/* $Id: get.c,v 1.58 2001/04/28 08:39:17 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -228,10 +228,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) break; case GL_CURRENT_COLOR: FLUSH_CURRENT(ctx, 0); - 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]); + params[0] = FLOAT_TO_BOOL(ctx->Current.Color[0]); + params[1] = FLOAT_TO_BOOL(ctx->Current.Color[1]); + params[2] = FLOAT_TO_BOOL(ctx->Current.Color[2]); + params[3] = FLOAT_TO_BOOL(ctx->Current.Color[3]); break; case GL_CURRENT_INDEX: FLUSH_CURRENT(ctx, 0); @@ -1427,10 +1427,10 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) break; case GL_CURRENT_COLOR: FLUSH_CURRENT(ctx, 0); - 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]); + params[0] = (ctx->Current.Color[0]); + params[1] = (ctx->Current.Color[1]); + params[2] = (ctx->Current.Color[2]); + params[3] = (ctx->Current.Color[3]); break; case GL_CURRENT_INDEX: FLUSH_CURRENT(ctx, 0); @@ -2420,9 +2420,9 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params ) break; case GL_CURRENT_SECONDARY_COLOR_EXT: FLUSH_CURRENT(ctx, 0); - params[0] = CHAN_TO_FLOAT(ctx->Current.SecondaryColor[0]); - params[1] = CHAN_TO_FLOAT(ctx->Current.SecondaryColor[1]); - params[2] = CHAN_TO_FLOAT(ctx->Current.SecondaryColor[2]); + params[0] = (ctx->Current.SecondaryColor[0]); + params[1] = (ctx->Current.SecondaryColor[1]); + params[2] = (ctx->Current.SecondaryColor[2]); break; case GL_SECONDARY_COLOR_ARRAY_EXT: *params = (GLdouble) ctx->Array.SecondaryColor.Enabled; @@ -2626,10 +2626,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) break; case GL_CURRENT_COLOR: FLUSH_CURRENT(ctx, 0); - 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]); + params[0] = (ctx->Current.Color[0]); + params[1] = (ctx->Current.Color[1]); + params[2] = (ctx->Current.Color[2]); + params[3] = (ctx->Current.Color[3]); break; case GL_CURRENT_INDEX: FLUSH_CURRENT(ctx, 0); @@ -3593,9 +3593,9 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) break; case GL_CURRENT_SECONDARY_COLOR_EXT: FLUSH_CURRENT(ctx, 0); - params[0] = CHAN_TO_FLOAT(ctx->Current.SecondaryColor[0]); - params[1] = CHAN_TO_FLOAT(ctx->Current.SecondaryColor[1]); - params[2] = CHAN_TO_FLOAT(ctx->Current.SecondaryColor[2]); + params[0] = (ctx->Current.SecondaryColor[0]); + params[1] = (ctx->Current.SecondaryColor[1]); + params[2] = (ctx->Current.SecondaryColor[2]); break; case GL_SECONDARY_COLOR_ARRAY_EXT: *params = (GLfloat) ctx->Array.SecondaryColor.Enabled; @@ -3773,10 +3773,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) *params = (GLint) ctx->Transform.ClipEnabled[i]; break; case GL_COLOR_CLEAR_VALUE: - params[0] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Color.ClearColor[0]) ); - params[1] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Color.ClearColor[1]) ); - params[2] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Color.ClearColor[2]) ); - params[3] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Color.ClearColor[3]) ); + params[0] = FLOAT_TO_INT( (ctx->Color.ClearColor[0]) ); + params[1] = FLOAT_TO_INT( (ctx->Color.ClearColor[1]) ); + params[2] = FLOAT_TO_INT( (ctx->Color.ClearColor[2]) ); + params[3] = FLOAT_TO_INT( (ctx->Color.ClearColor[3]) ); break; case GL_COLOR_MATERIAL: *params = (GLint) ctx->Light.ColorMaterialEnabled; @@ -3801,10 +3801,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) break; case GL_CURRENT_COLOR: FLUSH_CURRENT(ctx, 0); - 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] ) ); + params[0] = FLOAT_TO_INT( ( ctx->Current.Color[0] ) ); + params[1] = FLOAT_TO_INT( ( ctx->Current.Color[1] ) ); + params[2] = FLOAT_TO_INT( ( ctx->Current.Color[2] ) ); + params[3] = FLOAT_TO_INT( ( ctx->Current.Color[3] ) ); break; case GL_CURRENT_INDEX: FLUSH_CURRENT(ctx, 0); @@ -4795,9 +4795,9 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) break; case GL_CURRENT_SECONDARY_COLOR_EXT: FLUSH_CURRENT(ctx, 0); - params[0] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Current.SecondaryColor[0]) ); - params[1] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Current.SecondaryColor[1]) ); - params[2] = FLOAT_TO_INT( CHAN_TO_FLOAT(ctx->Current.SecondaryColor[2]) ); + params[0] = FLOAT_TO_INT( (ctx->Current.SecondaryColor[0]) ); + params[1] = FLOAT_TO_INT( (ctx->Current.SecondaryColor[1]) ); + params[2] = FLOAT_TO_INT( (ctx->Current.SecondaryColor[2]) ); break; case GL_SECONDARY_COLOR_ARRAY_EXT: *params = (GLint) ctx->Array.SecondaryColor.Enabled; diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index ecc6e877cce..0b79afa415e 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -1,4 +1,4 @@ -/* $Id: light.c,v 1.42 2001/03/29 16:50:32 brianp Exp $ */ +/* $Id: light.c,v 1.43 2001/04/28 08:39:17 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -745,16 +745,10 @@ void _mesa_update_material( GLcontext *ctx, * set by glColorMaterial(). */ void _mesa_update_color_material( GLcontext *ctx, - const GLchan rgba[4] ) + const GLfloat color[4] ) { struct gl_light *light, *list = &ctx->Light.EnabledList; GLuint bitmask = ctx->Light.ColorMaterialBitmask; - GLfloat color[4]; - - color[0] = CHAN_TO_FLOAT(rgba[0]); - color[1] = CHAN_TO_FLOAT(rgba[1]); - color[2] = CHAN_TO_FLOAT(rgba[2]); - color[3] = CHAN_TO_FLOAT(rgba[3]); if (MESA_VERBOSE&VERBOSE_IMMEDIATE) fprintf(stderr, "_mesa_update_color_material, mask 0x%x\n", bitmask); diff --git a/src/mesa/main/light.h b/src/mesa/main/light.h index 82b6d74a552..79fad5a98a7 100644 --- a/src/mesa/main/light.h +++ b/src/mesa/main/light.h @@ -1,4 +1,4 @@ -/* $Id: light.h,v 1.12 2001/03/12 00:48:38 gareth Exp $ */ +/* $Id: light.h,v 1.13 2001/04/28 08:39:17 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -116,7 +116,7 @@ extern void _mesa_copy_material_pairs( struct gl_material dst[2], GLuint bitmask ); extern void _mesa_update_color_material( GLcontext *ctx, - const GLchan rgba[4] ); + const GLfloat rgba[4] ); #endif diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index cfeadf108af..651b6bb7b95 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1,4 +1,4 @@ -/* $Id: mtypes.h,v 1.40 2001/04/20 16:46:04 brianp Exp $ */ +/* $Id: mtypes.h,v 1.41 2001/04/28 08:39:17 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -297,8 +297,8 @@ struct gl_current_attrib { /* These values valid only when FLUSH_VERTICES has been called. */ GLfloat Normal[3]; /* Current vertex normal */ - GLchan Color[4]; /* Current RGBA color */ - GLchan SecondaryColor[4]; /* Current secondary color */ + GLfloat Color[4]; /* Current RGBA color */ + GLfloat SecondaryColor[4]; /* Current secondary color */ GLfloat FogCoord; /* Current Fog coord */ GLuint Index; /* Current color index */ GLboolean EdgeFlag; /* Current edge flag */ @@ -489,7 +489,7 @@ struct gl_light_attrib { GLboolean _NeedVertices; /* Use fast shader? */ GLuint _Flags; /* LIGHT_* flags, see below */ GLfloat _BaseColor[2][3]; - GLchan _BaseAlpha[2]; + GLfloat _BaseAlpha[2]; }; @@ -970,6 +970,9 @@ struct gl_pixelstore_attrib { }; +#define CA_CLIENT_DATA 0x1 /* Data not alloced by mesa */ + + /* * Client vertex array attributes */ @@ -979,6 +982,7 @@ struct gl_client_array { GLsizei Stride; /* user-specified stride */ GLsizei StrideB; /* actual stride in bytes */ void *Ptr; + GLuint Flags; GLboolean Enabled; }; diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c index 09a4ebe8c63..79ec481267a 100644 --- a/src/mesa/main/rastpos.c +++ b/src/mesa/main/rastpos.c @@ -1,4 +1,4 @@ -/* $Id: rastpos.c,v 1.22 2001/03/12 00:48:38 gareth Exp $ */ +/* $Id: rastpos.c,v 1.23 2001/04/28 08:39:17 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -274,10 +274,10 @@ raster_pos4f(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) else { /* use current color or index */ if (ctx->Visual.rgbMode) { - 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]); + ctx->Current.RasterColor[0] = (ctx->Current.Color[0]); + ctx->Current.RasterColor[1] = (ctx->Current.Color[1]); + ctx->Current.RasterColor[2] = (ctx->Current.Color[2]); + ctx->Current.RasterColor[3] = (ctx->Current.Color[3]); } else { ctx->Current.RasterIndex = ctx->Current.Index; |