rendered paste bodycommit 50ef3e9421a3b9ae7165d2de152c7c9bf18bb3a6
Author: Matteo Bruni <matteo.mystral@gmail.com>
Date: Mon Jun 28 21:13:56 2010 +0200
wined3d: Setup target if offscreen rendering setting changed.
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index f21c805..2c78490 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2141,8 +2141,8 @@ static void context_setup_target(IWineD3DDeviceImpl *device,
const struct StateEntry *StateTable = device->StateTable;
if (!target) return;
- else if (context->current_rt == target) return;
render_offscreen = surface_is_offscreen(target);
+ if (context->current_rt == target && render_offscreen == old_render_offscreen) return;
context_set_render_offscreen(context, StateTable, render_offscreen);
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 6c5326c..e450746 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -328,9 +328,6 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
IWineD3DSurface_LoadLocation((IWineD3DSurface *)This->back_buffers[0], SFLAG_INTEXTURE, NULL);
IWineD3DSurface_ModifyLocation((IWineD3DSurface *)This->back_buffers[0], SFLAG_INDRAWABLE, FALSE);
This->render_to_fbo = TRUE;
-
- /* Force the context manager to update the render target configuration next draw. */
- context->current_rt = NULL;
}
if(This->render_to_fbo)