wined3d: Use surface_is_offscreen() in context_apply_draw_buffer().

This commit is contained in:
Henri Verbeet 2009-12-14 20:49:56 +01:00 committed by Alexandre Julliard
parent b796573d68
commit 2f56ef09e6
1 changed files with 2 additions and 4 deletions

View File

@ -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();
}