[PATCH 2/5] wined3d: Simply use context_apply_draw_buffers() in context_apply_clear_state().
Henri Verbeet
hverbeet at codeweavers.com
Sun Aug 29 14:57:41 CDT 2010
---
dlls/wined3d/context.c | 34 ++--------------------------------
1 files changed, 2 insertions(+), 32 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 8236c63..3e3193f 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2154,38 +2154,8 @@ void context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm
LEAVE_GL();
}
- if (!surface_is_offscreen(rts[0]))
- {
- ENTER_GL();
- context_set_draw_buffer(context, surface_get_gl_buffer(rts[0]));
- LEAVE_GL();
- }
- else
- {
- ENTER_GL();
-
- if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
- {
- const struct wined3d_gl_info *gl_info = context->gl_info;
- for (i = 0; i < gl_info->limits.buffers; ++i)
- {
- if (i < rt_count && rts[i])
- context->draw_buffers[i] = GL_COLOR_ATTACHMENT0 + i;
- else
- context->draw_buffers[i] = GL_NONE;
- }
- GL_EXTCALL(glDrawBuffersARB(gl_info->limits.buffers, context->draw_buffers));
- checkGLcall("glDrawBuffers()");
- context->draw_buffer_dirty = TRUE;
- }
- else
- {
- glDrawBuffer(device->offscreenBuffer);
- checkGLcall("glDrawBuffer()");
- }
-
- LEAVE_GL();
- }
+ context_apply_draw_buffers(context, rt_count, rts);
+ context->draw_buffer_dirty = TRUE;
if (context->last_was_blit)
{
--
1.7.1
More information about the wine-patches
mailing list