From 51ee7f4978257d01e9f101b65a90313779f9bcef Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Sun, 25 Feb 2007 18:03:00 -0700 Subject: [PATCH] wined3d: Use application provided fog range when fog is enabled. --- dlls/wined3d/state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 2b76dff930e..9e5aeb751ce 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -678,8 +678,10 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo ((IWineD3DVertexShaderImpl *)stateblock->vertexShader)->usesFog) { glFogi(GL_FOG_MODE, GL_LINEAR); checkGLcall("glFogi(GL_FOG_MODE, GL_LINEAR)"); - fogstart = 1.0; - fogend = 0.0; + if (stateblock->renderState[WINED3DRS_FOGTABLEMODE] == WINED3DFOG_NONE) { + fogstart = 1.0; + fogend = 0.0; + } context->last_was_foggy_shader = TRUE; } /* DX 7 sdk: "If both render states(vertex and table fog) are set to valid modes,