WineD3D: Make the destination surface glDirty in UpdateSurface

Stefan Dösinger stefandoesinger at gmx.at
Sat Aug 19 16:57:43 CDT 2006


I stumbled uppon this when hunting the broken flashlight in half-life 2
(dxlevel 80). UpdateSurface writes directly into the gl texture, so the 
texture should be marked updated so it is loaded back should the surface be 
locked again. This doesn't fix the flashlight, but it is a good idea :-)
-------------- next part --------------
From nobody Mon Sep 17 00:00:00 2001
From: Stefan Dösinger <stefan at codeweavers.com>
Date: Sat Aug 19 09:43:52 2006 +0200
Subject: [PATCH] WineD3D: Marke the destination gldirty in IWineD3DDevice::UpdateSurface

---

 dlls/wined3d/device.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

e21aca1ddbe54c14110d8452fcf9c4c47aba959d
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 84b2645..b3a4a06 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -6795,6 +6795,7 @@ static HRESULT  WINAPI  IWineD3DDeviceIm
         }
      }
     checkGLcall("glTexSubImage2D");
+    ((IWineD3DSurfaceImpl *)pDestinationSurface)->Flags |= SFLAG_GLDIRTY;
 
     /* I only need to look up baseTexture here, so it may be a good idea to hava a GL_TARGET ->
      * GL_DIMENSIONS lookup, or maybe store the dimensions on the surface (but that's making the
-- 
1.2.4



More information about the wine-patches mailing list