wined3d: Don't do GL calls without a context.

This commit is contained in:
Henri Verbeet 2008-10-08 17:34:51 +02:00 committed by Alexandre Julliard
parent 3b2ac77e12
commit af6636c21c
1 changed files with 2 additions and 1 deletions
dlls/wined3d

View File

@ -1493,12 +1493,13 @@ void ActivateContext(IWineD3DDeviceImpl *This, IWineD3DSurface *target, ContextU
else { else {
TRACE("Switching gl ctx to %p, hdc=%p ctx=%p\n", context, context->hdc, context->glCtx); TRACE("Switching gl ctx to %p, hdc=%p ctx=%p\n", context, context->hdc, context->glCtx);
This->frag_pipe->enable_extension((IWineD3DDevice *) This, FALSE);
ret = pwglMakeCurrent(context->hdc, context->glCtx); ret = pwglMakeCurrent(context->hdc, context->glCtx);
if(ret == FALSE) { if(ret == FALSE) {
ERR("Failed to activate the new context\n"); ERR("Failed to activate the new context\n");
} else if(!context->last_was_blit) { } else if(!context->last_was_blit) {
This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE); This->frag_pipe->enable_extension((IWineD3DDevice *) This, TRUE);
} else {
This->frag_pipe->enable_extension((IWineD3DDevice *) This, FALSE);
} }
} }
if(This->activeContext->vshader_const_dirty) { if(This->activeContext->vshader_const_dirty) {