Commit a549b8f0 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Fix a few MSVC data loss warnings.

parent 31901155
......@@ -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)));
}
}
......
......@@ -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 */
......
......@@ -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));
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment