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

This commit is contained in:
Roderick Colenbrander 2007-09-29 16:58:44 +02:00 committed by Alexandre Julliard
parent 46f33f4f38
commit 001f380ac9
3 changed files with 4 additions and 6 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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");