From 2ee6bb1cbb4ddfdfcc5eb17344c4fd20734e5672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Mon, 14 Dec 2009 23:58:13 +0100 Subject: [PATCH] wined3d: Frontbuffers are onscreen. --- dlls/wined3d/context.c | 3 ++- dlls/wined3d/device.c | 1 - dlls/wined3d/swapchain.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 62eb0ac84ce..f923a6f09e5 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1348,6 +1348,7 @@ struct wined3d_context *context_create(IWineD3DDeviceImpl *This, IWineD3DSurface ret->gl_info = &This->adapter->gl_info; ret->surface = (IWineD3DSurface *) target; ret->current_rt = (IWineD3DSurface *)target; + ret->render_offscreen = surface_is_offscreen((IWineD3DSurface *) target); ret->tid = GetCurrentThreadId(); if(This->shader_backend->shader_dirtifyable_constants((IWineD3DDevice *) This)) { /* Create the dirty constants array and initialize them to dirty */ @@ -1893,7 +1894,7 @@ static inline struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWin context = findThreadContextForSwapChain(swapchain, tid); old_render_offscreen = context->render_offscreen; - context->render_offscreen = ((IWineD3DSwapChainImpl *)swapchain)->render_to_fbo; + context->render_offscreen = surface_is_offscreen(target); /* The context != This->activeContext will catch a NOP context change. This can occur * if we are switching back to swapchain rendering in case of FBO or Back Buffer offscreen * rendering. No context change is needed in that case diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index c71d4eb59ea..a55f3e6c3ae 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -6297,7 +6297,6 @@ HRESULT create_primary_opengl_context(IWineD3DDevice *iface, IWineD3DSwapChain * } swapchain->context[0] = context_create(This, target, swapchain->win_handle, FALSE, &swapchain->presentParms); swapchain->num_contexts = 1; - swapchain->context[0]->render_offscreen = swapchain->render_to_fbo; create_dummy_textures(This); diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 91791de4b45..fb902ea6a45 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -809,8 +809,6 @@ HRESULT swapchain_init(IWineD3DSwapChainImpl *swapchain, WINED3DSURFTYPE surface hr = WINED3DERR_NOTAVAILABLE; goto err; } - - swapchain->context[0]->render_offscreen = swapchain->render_to_fbo; } else {