wined3d: Set the read buffer to GL_NONE for draws and clears on an FBO.

For the benefit of depth-only draws and clears, that would otherwise fail FBO
completeness, unless the driver supports ARB_ES2_compatibility.
This commit is contained in:
Henri Verbeet 2011-04-08 20:22:51 +02:00 committed by Alexandre Julliard
parent 2f3c147ab2
commit 8e12b2e61e
1 changed files with 4 additions and 0 deletions

View File

@ -2105,6 +2105,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm
++i;
}
context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, depth_stencil, SFLAG_INTEXTURE);
glReadBuffer(GL_NONE);
checkGLcall("glReadBuffer");
}
else
{
@ -2172,6 +2174,8 @@ BOOL context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp
ENTER_GL();
context_apply_fbo_state(context, GL_FRAMEBUFFER, device->render_targets,
device->depth_stencil, SFLAG_INTEXTURE);
glReadBuffer(GL_NONE);
checkGLcall("glReadBuffer");
LEAVE_GL();
}
}