Module: wine Branch: master Commit: 734b31e00b3f3aff6df6a967d61e93e3abb41a06 URL: http://source.winehq.org/git/wine.git/?a=commit;h=734b31e00b3f3aff6df6a967d6...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Sep 18 14:57:53 2008 +0200
wined3d: Handle drawbuffers in context_apply_fbo_state() instead of context_set_render_target_fbo().
---
dlls/wined3d/context.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index c3297ac..067db87 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -187,12 +187,9 @@ static void context_set_render_target_fbo(IWineD3DDevice *iface, DWORD idx, IWin if (render_target) { context_attach_surface_fbo(This, GL_FRAMEBUFFER_EXT, idx, render_target); - This->draw_buffers[idx] = GL_COLOR_ATTACHMENT0_EXT + idx; } else { GL_EXTCALL(glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT + idx, GL_TEXTURE_2D, 0, 0)); checkGLcall("glFramebufferTexture2DEXT()"); - - This->draw_buffers[idx] = GL_NONE; } }
@@ -281,6 +278,14 @@ void context_apply_fbo_state(IWineD3DDevice *iface) context_set_depth_stencil_fbo(iface, This->stencilBufferTarget); context->fbo_depth_attachment = This->stencilBufferTarget; } + + for (i = 0; i < GL_LIMITS(buffers); ++i) + { + if (This->render_targets[i]) + This->draw_buffers[i] = GL_COLOR_ATTACHMENT0_EXT + i; + else + This->draw_buffers[i] = GL_NONE; + } } else { GL_EXTCALL(glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0)); }