From 53174afeeb68a79e471185cb463c13ff90af698f Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 31 May 2008 18:14:09 +0900 Subject: mesa: Apply MSVC portability fixes from Alan Hourihane. --- src/mesa/state_tracker/st_atom_viewport.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mesa/state_tracker/st_atom_viewport.c') diff --git a/src/mesa/state_tracker/st_atom_viewport.c b/src/mesa/state_tracker/st_atom_viewport.c index 4b51521470..b105909e96 100644 --- a/src/mesa/state_tracker/st_atom_viewport.c +++ b/src/mesa/state_tracker/st_atom_viewport.c @@ -49,7 +49,7 @@ update_viewport( struct st_context *st ) */ if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) { yScale = -1; - yBias = ctx->DrawBuffer->Height ; + yBias = (GLfloat)ctx->DrawBuffer->Height; } else { yScale = 1.0; @@ -59,12 +59,12 @@ update_viewport( struct st_context *st ) /* _NEW_VIEWPORT */ { - GLfloat x = ctx->Viewport.X; - GLfloat y = ctx->Viewport.Y; + GLfloat x = (GLfloat)ctx->Viewport.X; + GLfloat y = (GLfloat)ctx->Viewport.Y; GLfloat z = ctx->Viewport.Near; - GLfloat half_width = ctx->Viewport.Width / 2.0; - GLfloat half_height = ctx->Viewport.Height / 2.0; - GLfloat half_depth = (ctx->Viewport.Far - ctx->Viewport.Near) / 2.0; + GLfloat half_width = (GLfloat)ctx->Viewport.Width / 2.0; + GLfloat half_height = (GLfloat)ctx->Viewport.Height / 2.0; + GLfloat half_depth = (GLfloat)(ctx->Viewport.Far - ctx->Viewport.Near) / 2.0; st->state.viewport.scale[0] = half_width; st->state.viewport.scale[1] = half_height * yScale; -- cgit v1.2.3