Commit 331679bc authored by Christopher GAUTIER's avatar Christopher GAUTIER Committed by Alexandre Julliard

wined3d: Disable GL_REGISTER_COMBINERS_NV (if supported) in IWineD3DSurfaceImpl_BltOverride.

parent 9024a88d
...@@ -2333,9 +2333,9 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT * ...@@ -2333,9 +2333,9 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
DWORD oldCKey; DWORD oldCKey;
DDCOLORKEY oldBltCKey = {0,0}; DDCOLORKEY oldBltCKey = {0,0};
GLint oldLight, oldFog, oldDepth, oldBlend, oldCull, oldAlpha; GLint oldLight, oldFog, oldDepth, oldBlend, oldCull, oldAlpha;
GLint oldStencil, oldNVRegisterCombiners = 0;
GLint alphafunc; GLint alphafunc;
GLclampf alpharef; GLclampf alpharef;
GLint oldStencil;
RECT SourceRectangle; RECT SourceRectangle;
GLint oldDraw; GLint oldDraw;
...@@ -2397,6 +2397,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT * ...@@ -2397,6 +2397,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
oldAlpha = glIsEnabled(GL_ALPHA_TEST); oldAlpha = glIsEnabled(GL_ALPHA_TEST);
oldStencil = glIsEnabled(GL_STENCIL_TEST); oldStencil = glIsEnabled(GL_STENCIL_TEST);
if (GL_SUPPORT(NV_REGISTER_COMBINERS)) {
oldNVRegisterCombiners = glIsEnabled(GL_REGISTER_COMBINERS_NV);
}
glGetIntegerv(GL_ALPHA_TEST_FUNC, &alphafunc); glGetIntegerv(GL_ALPHA_TEST_FUNC, &alphafunc);
checkGLcall("glGetFloatv GL_ALPHA_TEST_FUNC"); checkGLcall("glGetFloatv GL_ALPHA_TEST_FUNC");
glGetFloatv(GL_ALPHA_TEST_REF, &alpharef); glGetFloatv(GL_ALPHA_TEST_REF, &alpharef);
...@@ -2433,6 +2437,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT * ...@@ -2433,6 +2437,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
checkGLcall("glDisable GL_CULL_FACE"); checkGLcall("glDisable GL_CULL_FACE");
glDisable(GL_STENCIL_TEST); glDisable(GL_STENCIL_TEST);
checkGLcall("glDisable GL_STENCIL_TEST"); checkGLcall("glDisable GL_STENCIL_TEST");
if (GL_SUPPORT(NV_REGISTER_COMBINERS)) {
glDisable(GL_REGISTER_COMBINERS_NV);
checkGLcall("glDisable GL_REGISTER_COMBINERS_NV");
}
/* Ok, we need 2d textures, but not 1D or 3D */ /* Ok, we need 2d textures, but not 1D or 3D */
glDisable(GL_TEXTURE_1D); glDisable(GL_TEXTURE_1D);
...@@ -2536,6 +2544,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT * ...@@ -2536,6 +2544,10 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
glEnable(GL_ALPHA_TEST); glEnable(GL_ALPHA_TEST);
checkGLcall("glEnable GL_ALPHA_TEST"); checkGLcall("glEnable GL_ALPHA_TEST");
} }
if (GL_SUPPORT(NV_REGISTER_COMBINERS) && oldNVRegisterCombiners) {
glEnable(GL_REGISTER_COMBINERS_NV);
checkGLcall("glEnable GL_REGISTER_COMBINERS_NV");
}
glAlphaFunc(alphafunc, alpharef); glAlphaFunc(alphafunc, alpharef);
checkGLcall("glAlphaFunc\n"); checkGLcall("glAlphaFunc\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