Module: wine Branch: master Commit: 1282b433020674081ebf75b128180bf61e236b96 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1282b433020674081ebf75b128...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Feb 15 03:04:40 2007 +0100
wined3d: Restore blitting environment after modifying it.
---
dlls/wined3d/surface.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 093af9e..b8acb89 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -964,6 +964,12 @@ static void flush_to_framebuffer_drawpixels(IWineD3DSurfaceImpl *This) { vcheckGLcall("glPixelStorei GL_PACK_SWAP_BYTES"); }
+ /* Blitting environment requires that 2D texturing is enabled. It was turned off before, + * turn it on again + */ + glEnable(GL_TEXTURE_2D); + checkGLcall("glEnable(GL_TEXTURE_2D)"); + if(memory_allocated) HeapFree(GetProcessHeap(), 0, mem); return; } @@ -2639,6 +2645,11 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT * glEnd(); checkGLcall("glEnd");
+ if(Flags & (DDBLT_KEYSRC | DDBLT_KEYSRCOVERRIDE)) { + glDisable(GL_ALPHA_TEST); + checkGLcall("glDisable(GL_ALPHA_TEST)"); + } + /* Unbind the texture */ glBindTexture(GL_TEXTURE_2D, 0); checkGLcall("glEnable glBindTexture");