diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2001-09-14 21:36:43 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2001-09-14 21:36:43 +0000 |
commit | 7c276329e815c84ea2403bb08c44ff60179c0cd6 (patch) | |
tree | 9c4327b36e71c5c265fba1f1c8cbb9ae2497142a /src | |
parent | edf8c06270a0e62f33e3f45e1f0307acfeff3b5d (diff) |
more warning fixes (Karl Schultz)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/accum.c | 10 | ||||
-rw-r--r-- | src/mesa/main/api_loopback.c | 176 | ||||
-rw-r--r-- | src/mesa/main/attrib.c | 15 | ||||
-rw-r--r-- | src/mesa/main/blend.c | 10 | ||||
-rw-r--r-- | src/mesa/main/buffers.c | 6 | ||||
-rw-r--r-- | src/mesa/main/light.h | 5 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_tritmp.h | 8 |
7 files changed, 120 insertions, 110 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c index 85b856a20a..d190508a61 100644 --- a/src/mesa/main/accum.c +++ b/src/mesa/main/accum.c @@ -1,4 +1,4 @@ -/* $Id: accum.c,v 1.37 2001/03/12 00:48:37 gareth Exp $ */ +/* $Id: accum.c,v 1.38 2001/09/14 21:36:43 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -47,10 +47,10 @@ _mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - tmp[0] = CLAMP( red, -1.0, 1.0 ); - tmp[1] = CLAMP( green, -1.0, 1.0 ); - tmp[2] = CLAMP( blue, -1.0, 1.0 ); - tmp[3] = CLAMP( alpha, -1.0, 1.0 ); + tmp[0] = CLAMP( red, -1.0F, 1.0F ); + tmp[1] = CLAMP( green, -1.0F, 1.0F ); + tmp[2] = CLAMP( blue, -1.0F, 1.0F ); + tmp[3] = CLAMP( alpha, -1.0F, 1.0F ); if (TEST_EQ_4V(tmp, ctx->Accum.ClearColor)) return; diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index 3dabcc4423..bea893a208 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -1,4 +1,4 @@ -/* $Id: api_loopback.c,v 1.8 2001/05/10 15:42:42 keithw Exp $ */ +/* $Id: api_loopback.c,v 1.9 2001/09/14 21:37:52 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -83,9 +83,9 @@ static void loopback_Color3d( GLdouble red, GLdouble green, GLdouble blue ) { GLubyte col[4]; - GLfloat r = red; - GLfloat g = green; - GLfloat b = blue; + GLfloat r = (GLfloat) red; + GLfloat g = (GLfloat) green; + GLfloat b = (GLfloat) blue; UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); @@ -152,10 +152,10 @@ static void loopback_Color4d( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha ) { GLubyte col[4]; - GLfloat r = red; - GLfloat g = green; - GLfloat b = blue; - GLfloat a = alpha; + GLfloat r = (GLfloat) red; + GLfloat g = (GLfloat) green; + GLfloat b = (GLfloat) blue; + GLfloat a = (GLfloat) alpha; UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); @@ -224,9 +224,9 @@ static void loopback_Color3dv( const GLdouble *v ) { GLubyte col[4]; - GLfloat r = v[0]; - GLfloat g = v[1]; - GLfloat b = v[2]; + GLfloat r = (GLfloat) v[0]; + GLfloat g = (GLfloat) v[1]; + GLfloat b = (GLfloat) v[2]; UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); @@ -294,10 +294,10 @@ static void loopback_Color4dv( const GLdouble *v ) { GLubyte col[4]; - GLfloat r = v[0]; - GLfloat g = v[1]; - GLfloat b = v[2]; - GLfloat a = v[3]; + GLfloat r = (GLfloat) v[0]; + GLfloat g = (GLfloat) v[1]; + GLfloat b = (GLfloat) v[2]; + GLfloat a = (GLfloat) v[3]; UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); @@ -361,7 +361,7 @@ loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue ) static void loopback_Color3d_f( GLdouble red, GLdouble green, GLdouble blue ) { - COLORF( red, green, blue, 1.0 ); + COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, 1.0 ); } static void @@ -403,7 +403,7 @@ loopback_Color3bv_f( const GLbyte *v ) static void loopback_Color3dv_f( const GLdouble *v ) { - COLORF( v[0], v[1], v[2], 1.0 ); + COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0 ); } static void @@ -447,7 +447,7 @@ static void loopback_Color4d_f( GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha ) { - COLORF( red, green, blue, alpha ); + COLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue, (GLfloat) alpha ); } static void @@ -498,7 +498,7 @@ loopback_Color4bv_f( const GLbyte *v ) static void loopback_Color4dv_f( const GLdouble *v ) { - COLORF( v[0], v[1], v[2], v[3] ); + COLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], (GLfloat) v[3] ); } @@ -527,13 +527,13 @@ loopback_Color4usv_f( const GLushort *v) static void loopback_FogCoorddEXT( GLdouble d ) { - FOGCOORDF( d ); + FOGCOORDF( (GLfloat) d ); } static void loopback_FogCoorddvEXT( const GLdouble *v ) { - FOGCOORDF( *v ); + FOGCOORDF( (GLfloat) *v ); } @@ -600,7 +600,7 @@ loopback_Normal3b( GLbyte nx, GLbyte ny, GLbyte nz ) static void loopback_Normal3d( GLdouble nx, GLdouble ny, GLdouble nz ) { - NORMAL(nx, ny, nz); + NORMAL((GLfloat) nx, (GLfloat) ny, (GLfloat) nz); } static void @@ -624,7 +624,7 @@ loopback_Normal3bv( const GLbyte *v ) static void loopback_Normal3dv( const GLdouble *v ) { - NORMAL( v[0], v[1], v[2] ); + NORMAL( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); } static void @@ -642,145 +642,145 @@ loopback_Normal3sv( const GLshort *v ) static void loopback_TexCoord1d( GLdouble s ) { - TEXCOORD1(s); + TEXCOORD1((GLfloat) s); } static void loopback_TexCoord1i( GLint s ) { - TEXCOORD1(s); + TEXCOORD1((GLfloat) s); } static void loopback_TexCoord1s( GLshort s ) { - TEXCOORD1(s); + TEXCOORD1((GLfloat) s); } static void loopback_TexCoord2d( GLdouble s, GLdouble t ) { - TEXCOORD2(s,t); + TEXCOORD2((GLfloat) s,(GLfloat) t); } static void loopback_TexCoord2s( GLshort s, GLshort t ) { - TEXCOORD2(s,t); + TEXCOORD2((GLfloat) s,(GLfloat) t); } static void loopback_TexCoord2i( GLint s, GLint t ) { - TEXCOORD2(s,t); + TEXCOORD2((GLfloat) s,(GLfloat) t); } static void loopback_TexCoord3d( GLdouble s, GLdouble t, GLdouble r ) { - TEXCOORD3(s,t,r); + TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r); } static void loopback_TexCoord3i( GLint s, GLint t, GLint r ) { - TEXCOORD3(s,t,r); + TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r); } static void loopback_TexCoord3s( GLshort s, GLshort t, GLshort r ) { - TEXCOORD3(s,t,r); + TEXCOORD3((GLfloat) s,(GLfloat) t,(GLfloat) r); } static void loopback_TexCoord4d( GLdouble s, GLdouble t, GLdouble r, GLdouble q ) { - TEXCOORD4(s,t,r,q); + TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q); } static void loopback_TexCoord4i( GLint s, GLint t, GLint r, GLint q ) { - TEXCOORD4(s,t,r,q); + TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q); } static void loopback_TexCoord4s( GLshort s, GLshort t, GLshort r, GLshort q ) { - TEXCOORD4(s,t,r,q); + TEXCOORD4((GLfloat) s,(GLfloat) t,(GLfloat) r,(GLfloat) q); } static void loopback_TexCoord1dv( const GLdouble *v ) { - TEXCOORD1(v[0]); + TEXCOORD1((GLfloat) v[0]); } static void loopback_TexCoord1iv( const GLint *v ) { - TEXCOORD1(v[0]); + TEXCOORD1((GLfloat) v[0]); } static void loopback_TexCoord1sv( const GLshort *v ) { - TEXCOORD1(v[0]); + TEXCOORD1((GLfloat) v[0]); } static void loopback_TexCoord2dv( const GLdouble *v ) { - TEXCOORD2(v[0],v[1]); + TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]); } static void loopback_TexCoord2iv( const GLint *v ) { - TEXCOORD2(v[0],v[1]); + TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]); } static void loopback_TexCoord2sv( const GLshort *v ) { - TEXCOORD2(v[0],v[1]); + TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]); } static void loopback_TexCoord3dv( const GLdouble *v ) { - TEXCOORD2(v[0],v[1]); + TEXCOORD2((GLfloat) v[0],(GLfloat) v[1]); } static void loopback_TexCoord3iv( const GLint *v ) { - TEXCOORD3(v[0],v[1],v[2]); + TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]); } static void loopback_TexCoord3sv( const GLshort *v ) { - TEXCOORD3(v[0],v[1],v[2]); + TEXCOORD3((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2]); } static void loopback_TexCoord4dv( const GLdouble *v ) { - TEXCOORD4(v[0],v[1],v[2],v[3]); + TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]); } static void loopback_TexCoord4iv( const GLint *v ) { - TEXCOORD4(v[0],v[1],v[2],v[3]); + TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]); } static void loopback_TexCoord4sv( const GLshort *v ) { - TEXCOORD4(v[0],v[1],v[2],v[3]); + TEXCOORD4((GLfloat) v[0],(GLfloat) v[1],(GLfloat) v[2],(GLfloat) v[3]); } static void @@ -897,145 +897,151 @@ loopback_Vertex4sv( const GLshort *v ) static void loopback_MultiTexCoord1dARB(GLenum target, GLdouble s) { - MULTI_TEXCOORD1( target, s ); + MULTI_TEXCOORD1( target, (GLfloat) s ); } static void loopback_MultiTexCoord1dvARB(GLenum target, const GLdouble *v) { - MULTI_TEXCOORD1( target, v[0] ); + MULTI_TEXCOORD1( target, (GLfloat) v[0] ); } static void loopback_MultiTexCoord1iARB(GLenum target, GLint s) { - MULTI_TEXCOORD1( target, s ); + MULTI_TEXCOORD1( target, (GLfloat) s ); } static void loopback_MultiTexCoord1ivARB(GLenum target, const GLint *v) { - MULTI_TEXCOORD1( target, v[0] ); + MULTI_TEXCOORD1( target, (GLfloat) v[0] ); } static void loopback_MultiTexCoord1sARB(GLenum target, GLshort s) { - MULTI_TEXCOORD1( target, s ); + MULTI_TEXCOORD1( target, (GLfloat) s ); } static void loopback_MultiTexCoord1svARB(GLenum target, const GLshort *v) { - MULTI_TEXCOORD1( target, v[0] ); + MULTI_TEXCOORD1( target, (GLfloat) v[0] ); } static void loopback_MultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t) { - MULTI_TEXCOORD2( target, s, t ); + MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t ); } static void loopback_MultiTexCoord2dvARB(GLenum target, const GLdouble *v) { - MULTI_TEXCOORD2( target, v[0], v[1] ); + MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] ); } static void loopback_MultiTexCoord2iARB(GLenum target, GLint s, GLint t) { - MULTI_TEXCOORD2( target, s, t ); + MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t ); } static void loopback_MultiTexCoord2ivARB(GLenum target, const GLint *v) { - MULTI_TEXCOORD2( target, v[0], v[1] ); + MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] ); } static void loopback_MultiTexCoord2sARB(GLenum target, GLshort s, GLshort t) { - MULTI_TEXCOORD2( target, s, t ); + MULTI_TEXCOORD2( target, (GLfloat) s, (GLfloat) t ); } static void loopback_MultiTexCoord2svARB(GLenum target, const GLshort *v) { - MULTI_TEXCOORD2( target, v[0], v[1] ); + MULTI_TEXCOORD2( target, (GLfloat) v[0], (GLfloat) v[1] ); } static void loopback_MultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r) { - MULTI_TEXCOORD3( target, s, t, r ); + MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r ); } static void loopback_MultiTexCoord3dvARB(GLenum target, const GLdouble *v) { - MULTI_TEXCOORD3( target, v[0], v[1], v[2] ); + MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); } static void loopback_MultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r) { - MULTI_TEXCOORD3( target, s, t, r ); + MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r ); } static void loopback_MultiTexCoord3ivARB(GLenum target, const GLint *v) { - MULTI_TEXCOORD3( target, v[0], v[1], v[2] ); + MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); } static void loopback_MultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r) { - MULTI_TEXCOORD3( target, s, t, r ); + MULTI_TEXCOORD3( target, (GLfloat) s, (GLfloat) t, (GLfloat) r ); } static void loopback_MultiTexCoord3svARB(GLenum target, const GLshort *v) { - MULTI_TEXCOORD3( target, v[0], v[1], v[2] ); + MULTI_TEXCOORD3( target, (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); } static void loopback_MultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) { - MULTI_TEXCOORD4( target, s, t, r, q ); + MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t, + (GLfloat) r, (GLfloat) q ); } static void loopback_MultiTexCoord4dvARB(GLenum target, const GLdouble *v) { - MULTI_TEXCOORD4( target, v[0], v[1], v[2], v[3] ); + MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1], + (GLfloat) v[2], (GLfloat) v[3] ); } static void loopback_MultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q) { - MULTI_TEXCOORD4( target, s, t, r, q ); + MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t, + (GLfloat) r, (GLfloat) q ); } static void loopback_MultiTexCoord4ivARB(GLenum target, const GLint *v) { - MULTI_TEXCOORD4( target, v[0], v[1], v[2], v[3] ); + MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1], + (GLfloat) v[2], (GLfloat) v[3] ); } static void loopback_MultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) { - MULTI_TEXCOORD4( target, s, t, r, q ); + MULTI_TEXCOORD4( target, (GLfloat) s, (GLfloat) t, + (GLfloat) r, (GLfloat) q ); } static void loopback_MultiTexCoord4svARB(GLenum target, const GLshort *v) { - MULTI_TEXCOORD4( target, v[0], v[1], v[2], v[3] ); + MULTI_TEXCOORD4( target, (GLfloat) v[0], (GLfloat) v[1], + (GLfloat) v[2], (GLfloat) v[3] ); } static void @@ -1122,13 +1128,13 @@ loopback_Materialiv(GLenum face, GLenum pname, const GLint *params ) static void loopback_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) { - RECTF(x1, y1, x2, y2); + RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2); } static void loopback_Rectdv(const GLdouble *v1, const GLdouble *v2) { - RECTF(v1[0], v1[1], v2[0], v2[1]); + RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]); } static void @@ -1140,25 +1146,25 @@ loopback_Rectfv(const GLfloat *v1, const GLfloat *v2) static void loopback_Recti(GLint x1, GLint y1, GLint x2, GLint y2) { - RECTF(x1, y1, x2, y2); + RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2); } static void loopback_Rectiv(const GLint *v1, const GLint *v2) { - RECTF(v1[0], v1[1], v2[0], v2[1]); + RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]); } static void loopback_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) { - RECTF(x1, y1, x2, y2); + RECTF((GLfloat) x1, (GLfloat) y1, (GLfloat) x2, (GLfloat) y2); } static void loopback_Rectsv(const GLshort *v1, const GLshort *v2) { - RECTF(v1[0], v1[1], v2[0], v2[1]); + RECTF((GLfloat) v1[0], (GLfloat) v1[1], (GLfloat) v2[0], (GLfloat) v2[1]); } static void @@ -1173,9 +1179,9 @@ static void loopback_SecondaryColor3dEXT( GLdouble red, GLdouble green, GLdouble blue ) { GLubyte col[3]; - GLfloat r = red; - GLfloat g = green; - GLfloat b = blue; + GLfloat r = (GLfloat) red; + GLfloat g = (GLfloat) green; + GLfloat b = (GLfloat) blue; UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); @@ -1227,9 +1233,9 @@ static void loopback_SecondaryColor3dvEXT( const GLdouble *v ) { GLubyte col[3]; - GLfloat r = v[0]; - GLfloat g = v[1]; - GLfloat b = v[2]; + GLfloat r = (GLfloat) v[0]; + GLfloat g = (GLfloat) v[1]; + GLfloat b = (GLfloat) v[2]; UNCLAMPED_FLOAT_TO_UBYTE(col[0], r); UNCLAMPED_FLOAT_TO_UBYTE(col[1], g); UNCLAMPED_FLOAT_TO_UBYTE(col[2], b); @@ -1280,7 +1286,7 @@ loopback_SecondaryColor3bEXT_f( GLbyte red, GLbyte green, GLbyte blue ) static void loopback_SecondaryColor3dEXT_f( GLdouble red, GLdouble green, GLdouble blue ) { - SECONDARYCOLORF( red, green, blue ); + SECONDARYCOLORF( (GLfloat) red, (GLfloat) green, (GLfloat) blue ); } static void @@ -1326,7 +1332,7 @@ loopback_SecondaryColor3bvEXT_f( const GLbyte *v ) static void loopback_SecondaryColor3dvEXT_f( const GLdouble *v ) { - SECONDARYCOLORF( v[0], v[1], v[2] ); + SECONDARYCOLORF( (GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2] ); } static void loopback_SecondaryColor3ivEXT_f( const GLint *v ) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index fa8f9b0b20..9b515c7a6b 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1,4 +1,4 @@ -/* $Id: attrib.c,v 1.55 2001/08/07 23:10:55 brianp Exp $ */ +/* $Id: attrib.c,v 1.56 2001/09/14 21:36:43 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -598,12 +598,15 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib) GLuint numObjs, i; _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + u); - _mesa_set_enable(ctx, GL_TEXTURE_1D, unit->Enabled & TEXTURE0_1D); - _mesa_set_enable(ctx, GL_TEXTURE_2D, unit->Enabled & TEXTURE0_2D); - _mesa_set_enable(ctx, GL_TEXTURE_3D, unit->Enabled & TEXTURE0_3D); + _mesa_set_enable(ctx, GL_TEXTURE_1D, + (GLboolean) (unit->Enabled & TEXTURE0_1D) ? GL_TRUE : GL_FALSE); + _mesa_set_enable(ctx, GL_TEXTURE_2D, + (GLboolean) (unit->Enabled & TEXTURE0_2D) ? GL_TRUE : GL_FALSE); + _mesa_set_enable(ctx, GL_TEXTURE_3D, + (GLboolean) (unit->Enabled & TEXTURE0_3D) ? GL_TRUE : GL_FALSE); if (ctx->Extensions.ARB_texture_cube_map) { _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP_ARB, - unit->Enabled & TEXTURE0_CUBE); + (GLboolean) (unit->Enabled & TEXTURE0_CUBE) ? GL_TRUE : GL_FALSE); } _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, unit->EnvMode); _mesa_TexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, unit->EnvColor); @@ -786,7 +789,7 @@ _mesa_PopAttrib(void) { const struct gl_colorbuffer_attrib *color; color = (const struct gl_colorbuffer_attrib *) attr->data; - _mesa_ClearIndex(color->ClearIndex); + _mesa_ClearIndex((GLfloat) color->ClearIndex); _mesa_ClearColor(CHAN_TO_FLOAT(color->ClearColor[0]), CHAN_TO_FLOAT(color->ClearColor[1]), CHAN_TO_FLOAT(color->ClearColor[2]), diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index d99d078748..b00e834d4f 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -1,4 +1,4 @@ -/* $Id: blend.c,v 1.33 2001/06/18 17:26:08 brianp Exp $ */ +/* $Id: blend.c,v 1.34 2001/09/14 21:36:43 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -326,10 +326,10 @@ _mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - tmp[0] = CLAMP( red, 0.0, 1.0 ); - tmp[1] = CLAMP( green, 0.0, 1.0 ); - tmp[2] = CLAMP( blue, 0.0, 1.0 ); - tmp[3] = CLAMP( alpha, 0.0, 1.0 ); + tmp[0] = CLAMP( red, 0.0F, 1.0F ); + tmp[1] = CLAMP( green, 0.0F, 1.0F ); + tmp[2] = CLAMP( blue, 0.0F, 1.0F ); + tmp[3] = CLAMP( alpha, 0.0F, 1.0F ); if (TEST_EQ_4V(tmp, ctx->Color.BlendColor)) return; diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 075cc66adf..2fa540250a 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -1,4 +1,4 @@ -/* $Id: buffers.c,v 1.30 2001/06/18 17:26:08 brianp Exp $ */ +/* $Id: buffers.c,v 1.31 2001/09/14 21:36:43 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -123,7 +123,7 @@ _mesa_Clear( GLbitfield mask ) } ASSERT(ctx->Driver.Clear); - ctx->Driver.Clear( ctx, ddMask, !ctx->Scissor.Enabled, + ctx->Driver.Clear( ctx, ddMask, (GLboolean) !ctx->Scissor.Enabled, x, y, width, height ); } } @@ -416,7 +416,7 @@ _mesa_SampleCoverageARB(GLclampf value, GLboolean invert) } ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx ); - ctx->Multisample.SampleCoverageValue = CLAMP(value, 0.0, 1.0); + ctx->Multisample.SampleCoverageValue = (GLfloat) CLAMP(value, 0.0, 1.0); ctx->Multisample.SampleCoverageInvert = invert; ctx->NewState |= _NEW_MULTISAMPLE; } diff --git a/src/mesa/main/light.h b/src/mesa/main/light.h index 79fad5a98a..5cd24e83ff 100644 --- a/src/mesa/main/light.h +++ b/src/mesa/main/light.h @@ -1,4 +1,4 @@ -/* $Id: light.h,v 1.13 2001/04/28 08:39:17 keithw Exp $ */ +/* $Id: light.h,v 1.14 2001/09/14 21:36:43 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -78,6 +78,7 @@ _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params ); /* Lerp between adjacent values in the f(x) lookup table, giving a * continuous function, with adequeate overall accuracy. (Though * still pretty good compared to a straight lookup). + * Result should be a GLfloat. */ #define GET_SHINE_TAB_ENTRY( table, dp, result ) \ do { \ @@ -85,7 +86,7 @@ do { \ float f = (dp * (SHINE_TABLE_SIZE-1)); \ int k = (int) f; \ if (k > SHINE_TABLE_SIZE-2) \ - result = pow( dp, _tab->shininess ); \ + result = (GLfloat) pow( dp, _tab->shininess ); \ else \ result = _tab->tab[k] + (f-k)*(_tab->tab[k+1]-_tab->tab[k]); \ } while (0) diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h index aeb407da49..61d1f8008a 100644 --- a/src/mesa/swrast_setup/ss_tritmp.h +++ b/src/mesa/swrast_setup/ss_tritmp.h @@ -1,4 +1,4 @@ -/* $Id: ss_tritmp.h,v 1.14 2001/07/17 19:39:32 keithw Exp $ */ +/* $Id: ss_tritmp.h,v 1.15 2001/09/14 21:36:43 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -92,11 +92,11 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) GLfloat fz = z[1] - z[2]; GLfloat a = ey*fz - ez*fy; GLfloat b = ez*fx - ex*fz; - GLfloat ic = 1.0 / cc; + GLfloat ic = 1.0F / cc; GLfloat ac = a * ic; GLfloat bc = b * ic; - if (ac < 0.0f) ac = -ac; - if (bc < 0.0f) bc = -bc; + if (ac < 0.0F) ac = -ac; + if (bc < 0.0F) bc = -bc; offset += MAX2(ac, bc) * ctx->Polygon.OffsetFactor; } offset *= ctx->MRD; |