From 2d0016c5bc872afb562727278cfd341cea182600 Mon Sep 17 00:00:00 2001 From: Felix Nawothnig Date: Sun, 8 Apr 2007 02:46:40 +0200 Subject: [PATCH] wined3d: Preload target in ActivateContext() for ORM_BACKBUFFER/ORM_PBUFFER. --- dlls/wined3d/context.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index d21f5b8b09..d3424fd7f8 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -712,6 +712,13 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU break; } + if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) { + /* Make sure we have a OpenGL texture name so the PreLoad() used to read the buffer + * back when we are done won't mark us dirty. + */ + IWineD3DSurface_PreLoad(target); + } + if(!oldRenderOffscreen) { Context_MarkStateDirty(context, WINED3DRS_CULLMODE); Context_MarkStateDirty(context, WINED3DTS_PROJECTION);