mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
wined3d: Only set draw buffers that are explicitly specified in context_apply_draw_buffers().
Anything that isn't explicitly specified is set to GL_NONE by glDrawBuffersARB().
This commit is contained in:
parent
bf99c0248f
commit
2f3c147ab2
@ -1937,9 +1937,9 @@ static void context_apply_draw_buffers(struct wined3d_context *context, UINT rt_
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < gl_info->limits.buffers; ++i)
|
||||
for (i = 0; i < rt_count; ++i)
|
||||
{
|
||||
if (i < rt_count && rts[i] && rts[i]->resource.format->id != WINED3DFMT_NULL)
|
||||
if (rts[i] && rts[i]->resource.format->id != WINED3DFMT_NULL)
|
||||
context->draw_buffers[i] = GL_COLOR_ATTACHMENT0 + i;
|
||||
else
|
||||
context->draw_buffers[i] = GL_NONE;
|
||||
@ -1947,7 +1947,7 @@ static void context_apply_draw_buffers(struct wined3d_context *context, UINT rt_
|
||||
|
||||
if (gl_info->supported[ARB_DRAW_BUFFERS])
|
||||
{
|
||||
GL_EXTCALL(glDrawBuffersARB(gl_info->limits.buffers, context->draw_buffers));
|
||||
GL_EXTCALL(glDrawBuffersARB(rt_count, context->draw_buffers));
|
||||
checkGLcall("glDrawBuffers()");
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user