Restore the texture env mode on SetTexture - Fixes problem in
authorJason Edmeades <us@the-edmeades.demon.co.uk>
Tue, 21 Jan 2003 00:30:27 +0000 (00:30 +0000)
committerAlexandre Julliard <julliard@winehq.org>
Tue, 21 Jan 2003 00:30:27 +0000 (00:30 +0000)
codesampler demo.

dlls/d3d8/device.c

index 8036eeaca2adf50d9c2f49371c5cefa617f9f6cf..c140d82bef882574db91e45823c42d7ff475d552 100644 (file)
@@ -3511,7 +3511,12 @@ HRESULT  WINAPI  IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
                         glDisable(GL_TEXTURE_3D);
                         checkGLcall("Disable GL_TEXTURE_3D");
                     }
-               }
+                }
+
+                /* Re-Enable GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT */
+                if (Value != D3DTOP_DISABLE) {
+                    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
+                }
 
                 /* Now set up the operand correctly */
                 switch (Value) {