wined3d: Activate context before applying fbo state.

This commit is contained in:
Vitaliy Margolen 2007-08-13 08:11:21 -06:00 committed by Alexandre Julliard
parent 6b177c44e1
commit b56afd0cff
1 changed files with 4 additions and 7 deletions

View File

@ -4415,16 +4415,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Clear(IWineD3DDevice *iface, DWORD Coun
/* This is for offscreen rendering as well as for multithreading, thus activate the set render target /* This is for offscreen rendering as well as for multithreading, thus activate the set render target
* and not the last active one. * and not the last active one.
*/ */
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) {
ENTER_GL();
apply_fbo_state(iface);
LEAVE_GL();
}
ActivateContext(This, This->render_targets[0], CTXUSAGE_CLEAR); ActivateContext(This, This->render_targets[0], CTXUSAGE_CLEAR);
ENTER_GL(); ENTER_GL();
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) {
apply_fbo_state(iface);
}
if (Count > 0 && pRects) { if (Count > 0 && pRects) {
curRect = pRects; curRect = pRects;
} else { } else {