wined3d: Fix a few MSVC data loss warnings.

This commit is contained in:
Stefan Dösinger 2011-05-12 18:05:27 +02:00 committed by Alexandre Julliard
parent 31901155ce
commit a549b8f090
4 changed files with 9 additions and 9 deletions

View File

@ -274,7 +274,7 @@ static void drawStridedSlow(IWineD3DDeviceImpl *device, const struct wined3d_con
if (specular_fog)
{
DWORD specularColor = *(const DWORD *)ptrToCoords;
GL_EXTCALL(glFogCoordfEXT(specularColor >> 24));
GL_EXTCALL(glFogCoordfEXT((float) (specularColor >> 24)));
}
}

View File

@ -178,9 +178,9 @@ static void WINE_GLAPI wine_glFogi(GLenum pname, GLint param) {
}
} else {
if(pname == GL_FOG_START) {
ctx->fogstart = param;
ctx->fogstart = (float) param;
} else if(pname == GL_FOG_END) {
ctx->fogend = param;
ctx->fogend = (float) param;
}
old_fogcoord_glFogi(pname, param);
}
@ -199,9 +199,9 @@ static void WINE_GLAPI wine_glFogiv(GLenum pname, const GLint *param) {
}
} else {
if(pname == GL_FOG_START) {
ctx->fogstart = *param;
ctx->fogstart = (float) *param;
} else if(pname == GL_FOG_END) {
ctx->fogend = *param;
ctx->fogend = (float) *param;
}
old_fogcoord_glFogiv(pname, param);
}
@ -331,13 +331,13 @@ static void WINE_GLAPI wine_glFogCoordfEXT(GLfloat f) {
ctx->fog_coord_value = f;
}
static void WINE_GLAPI wine_glFogCoorddEXT(GLdouble f) {
wine_glFogCoordfEXT(f);
wine_glFogCoordfEXT((GLfloat) f);
}
static void WINE_GLAPI wine_glFogCoordfvEXT(const GLfloat *f) {
wine_glFogCoordfEXT(*f);
}
static void WINE_GLAPI wine_glFogCoorddvEXT(const GLdouble *f) {
wine_glFogCoordfEXT(*f);
wine_glFogCoordfEXT((GLfloat) *f);
}
/* End GL_EXT_fog_coord emulation */

View File

@ -829,7 +829,7 @@ static void shader_glsl_load_constants(const struct wined3d_context *context,
correction_params[1] = 1.0f;
} else {
/* position is window relative, not viewport relative */
correction_params[0] = context->current_rt->resource.height;
correction_params[0] = (float) context->current_rt->resource.height;
correction_params[1] = -1.0f;
}
GL_EXTCALL(glUniform4fvARB(prog->ycorrection_location, 1, correction_params));

View File

@ -2554,7 +2554,7 @@ HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb)
static inline unsigned short float_32_to_16(const float *in)
{
int exp = 0;
float tmp = fabs(*in);
float tmp = fabsf(*in);
unsigned int mantissa;
unsigned short ret;