Commit 001f380a authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wined3d: CreateContext should not be called between ENTER_GL/LEAVE_GL.

parent 46f33f4f
......@@ -324,6 +324,7 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
goto out;
}
ENTER_GL();
TRACE("Setting up the screen\n");
/* Clear the screen */
glClearColor(1.0, 0.0, 0.0, 0.0);
......@@ -389,6 +390,7 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
checkGLcall("glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)\n");
}
}
LEAVE_GL();
if(oldDrawable && oldCtx) {
pwglMakeCurrent(oldDrawable, oldCtx);
......
......@@ -1456,10 +1456,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
return E_OUTOFMEMORY;
object->num_contexts = 1;
ENTER_GL();
object->context[0] = CreateContext(This, (IWineD3DSurfaceImpl *) object->frontBuffer, object->win_handle, FALSE /* pbuffer */, pPresentationParameters);
LEAVE_GL();
if (!object->context[0]) {
ERR("Failed to create a new context\n");
hr = WINED3DERR_NOTAVAILABLE;
......
......@@ -132,7 +132,6 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
ActivateContext(This->wineD3DDevice, This->backBuffer[0], CTXUSAGE_RESOURCELOAD);
ENTER_GL();
/* Render the cursor onto the back buffer, using our nifty directdraw blitting code :-) */
if(This->wineD3DDevice->bCursorVisible && This->wineD3DDevice->cursorTexture) {
......@@ -244,7 +243,9 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
#if defined(SHOW_FRAME_MAKEUP)
FIXME("Singe Frame snapshots Starting\n");
isDumpingFrames = TRUE;
ENTER_GL();
glClear(GL_COLOR_BUFFER_BIT);
LEAVE_GL();
#endif
#if defined(SINGLE_FRAME_DEBUGGING)
......@@ -272,8 +273,6 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
}
#endif
LEAVE_GL();
if (This->presentParms.SwapEffect == WINED3DSWAPEFFECT_DISCARD) {
TRACE("Clearing the color buffer with pink color\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment