wined3d: Disable GL_REGISTER_COMBINERS_NV (if supported) in IWineD3DSurfaceImpl_BltOverride.

This commit is contained in:
Christopher GAUTIER 2006-10-05 09:45:23 +02:00 committed by Alexandre Julliard
parent 9024a88dd9
commit 331679bcc9
1 changed files with 13 additions and 1 deletions

View File

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