Vitaliy Margolen : wined3d: Use application provided fog range when fog is enabled.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Feb 26 07:59:33 CST 2007


Module: wine
Branch: master
Commit: 51ee7f4978257d01e9f101b65a90313779f9bcef
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=51ee7f4978257d01e9f101b65a90313779f9bcef

Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date:   Sun Feb 25 18:03:00 2007 -0700

wined3d: Use application provided fog range when fog is enabled.

---

 dlls/wined3d/state.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 2b76dff..9e5aeb7 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,




More information about the wine-cvs mailing list