[PATCH 5/5] wined3d: Use surface_is_offscreen() in context_apply_draw_buffer().
Henri Verbeet
hverbeet at codeweavers.com
Mon Dec 14 13:49:56 CST 2009
---
dlls/wined3d/context.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 0debd2e..62eb0ac 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2054,15 +2054,13 @@ static void context_apply_draw_buffer(struct wined3d_context *context, BOOL blit
{
const struct wined3d_gl_info *gl_info = context->gl_info;
IWineD3DSurface *rt = context->current_rt;
- IWineD3DSwapChain *swapchain;
IWineD3DDeviceImpl *device;
device = ((IWineD3DSurfaceImpl *)rt)->resource.device;
- if (SUCCEEDED(IWineD3DSurface_GetContainer(rt, &IID_IWineD3DSwapChain, (void **)&swapchain)))
+ if (!surface_is_offscreen(rt))
{
- IWineD3DSwapChain_Release((IUnknown *)swapchain);
ENTER_GL();
- glDrawBuffer(surface_get_gl_buffer(rt, swapchain));
+ glDrawBuffer(surface_get_gl_buffer(rt, (IWineD3DSwapChain *)((IWineD3DSurfaceImpl *)rt)->container));
checkGLcall("glDrawBuffers()");
LEAVE_GL();
}
--
1.6.4.4
More information about the wine-patches
mailing list