casts for g++

This commit is contained in:
Brian Paul 2003-11-25 16:21:51 +00:00
parent 3bc7f3f864
commit 2c9f50dd4a
4 changed files with 5 additions and 5 deletions

View File

@ -195,7 +195,7 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
return GL_FALSE;
if (ctx->Const.CheckArrayBounds) {
if (start + count > ctx->Array._MaxElement)
if (start + count > (GLint) ctx->Array._MaxElement)
return GL_FALSE;
}

View File

@ -4753,7 +4753,7 @@ static void save_Indexf( GLfloat x )
ctx->ListState.CurrentIndex = x;
if (ctx->ExecuteFlag) {
(*ctx->Exec->Indexi)( x );
(*ctx->Exec->Indexi)( (GLint) x );
}
}

View File

@ -3809,7 +3809,7 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n,
GLhalfNV *dst = (GLhalfNV *) dest;
GLuint i;
for (i=0;i<n;i++) {
dst[i] = _mesa_half_to_float(source[i]);
dst[i] = _mesa_float_to_half( (float) source[i] );
}
if (dstPacking->SwapBytes) {
_mesa_swap2( (GLushort *) dst, n );

View File

@ -345,7 +345,7 @@ raster_pos4f(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
ctx->Current.Attrib[VERT_ATTRIB_COLOR1]);
}
else {
ctx->Current.RasterIndex = ctx->Current.Index;
ctx->Current.RasterIndex = (GLuint) ctx->Current.Index;
}
}
@ -636,7 +636,7 @@ window_pos3f(GLfloat x, GLfloat y, GLfloat z)
= CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F);
}
else {
ctx->Current.RasterIndex = ctx->Current.Index;
ctx->Current.RasterIndex = (GLuint) ctx->Current.Index;
}
/* raster texcoord = current texcoord */