No subject


Wed Feb 20 09:39:33 CST 2008


=0A=0A---=0A dlls/d3dx9_36/offscreen.c |   57 +++++++++++++++++++++++++++++=
+++++++++++++++-=0A 1 files changed, 56 insertions(+), 1 deletions(-)=0A=0A=
diff --git a/dlls/d3dx9_36/offscreen.c b/dlls/d3dx9_36/offscreen.c=0Aindex =
0fcbd8c..3572ff7 100644=0A--- a/dlls/d3dx9_36/offscreen.c=0A+++ b/dlls/d3dx=
9_36/offscreen.c=0A@@ -215,10 +215,65 @@ static HRESULT WINAPI ID3DXRenderT=
oSurfaceImpl_BeginScene(LPD3DXRENDERTOSURFACE=0A     return D3D_OK;=0A }=0A=
 =0A+ /************************************************************=0A+   *=
          ID3DXRenderToSurfaceImpl_EndScene=0A+   *=0A+   * Restores the ol=
d state. Copies the contents of buffer=0A+   * onto the surface if it didn'=
t support being a render=0A+   * target.=0A+   *=0A+   * PARAMS=0A+   *   i=
face     [I]  RTS object=0A+   *   mipfilter [I]  specifies what filter to =
use=0A+   *=0A+   * RETURNS=0A+   *   Success: D3D_OK=0A+   *   Failure: D3=
DERR_INVALIDCALL=0A+   *            D3DXERR_INVALIDDATA (says MSDN)=0A+   *=
=0A+   * TODOS=0A+   *   Find out what we have to do with mipfilter=0A+   *=
   Find out when this function returns D3DXERR_INVALIDDATA=0A+   *=0A+   */=
=0A static HRESULT WINAPI ID3DXRenderToSurfaceImpl_EndScene(LPD3DXRENDERTOS=
URFACE iface, DWORD mipfilter)=0A {=0A     ID3DXRenderToSurfaceImpl *This=
=3D(ID3DXRenderToSurfaceImpl*)iface;=0A-    FIXME("(%p): stub\n", This);=0A=
+    TRACE("(%p): relay\n", This);=0A+=0A+    if(This->target=3D=3DNULL) re=
turn D3DERR_INVALIDCALL;=0A+=0A+    IDirect3DDevice9_EndScene(This->device)=
;=0A+=0A+    /* If we have created an own render target */=0A+    if(This->=
buffer!=3DThis->target) {=0A+        D3DSURFACE_DESC tardesc, bufdesc;=0A+ =
       RECT tarrect, bufrect;=0A+        /* LPDIRECT3DDEVICE9 bufdev; */=0A=
+=0A+        IDirect3DSurface9_GetDesc(This->buffer, &bufdesc);=0A+        =
IDirect3DSurface9_GetDesc(This->target, &tardesc);=0A+=0A+        bufrect.l=
eft=3D0;    bufrect.right=3Dbufdesc.Width;=0A+        bufrect.top=3D0;     =
bufrect.bottom=3Dbufdesc.Height;=0A+        tarrect.left=3D0;    tarrect.ri=
ght=3Dtardesc.Width;=0A+        tarrect.top=3D0;     tarrect.bottom=3Dtarde=
sc.Height;=0A+=0A+        /* The native d3dx9 does a buffer->GetDevice(&buf=
dev) here.=0A+           However, I see no point in this and thus just use =
our device. */=0A+=0A+        IDirect3DDevice9_StretchRect(This->device, Th=
is->buffer, &bufrect, This->target, &tarrect, D3DTEXF_NONE);=0A+    }=0A+=
=0A+    /* TODO: Check what to do with mipfilter */=0A+=0A+    IDirect3DDev=
ice9_SetRenderTarget(This->device, 0, This->oldtarget);=0A+    IDirect3DDev=
ice9_SetDepthStencilSurface(This->device, This->oldstencil);=0A+    IDirect=
3DStateBlock9_Apply(This->stateblock);=0A+    IUnknown_Release(This->oldste=
ncil);=0A+    IUnknown_Release(This->oldtarget);=0A+    IUnknown_Release(Th=
is->buffer);=0A+=0A     return D3D_OK;=0A }=0A =0A-- =0A1.5.3.7=0A=0A

--b0ff7f79db916d1e951c76ed1f153ea36--



More information about the wine-patches mailing list