wined3d: Also update alpha test when stage texture is NULL.

This commit is contained in:
Alexander Dorofeyev 2007-12-27 00:23:59 -08:00 committed by Alexandre Julliard
parent 5624948c71
commit 27c98fd628
1 changed files with 7 additions and 0 deletions

View File

@ -2421,6 +2421,13 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont
if(!isStateDirty(context, STATE_TEXTURESTAGE(sampler, WINED3DTSS_COLOROP))) {
activate_dimensions(sampler, stateblock, context);
}
if(stateblock->renderState[WINED3DRS_COLORKEYENABLE] && sampler == 0) {
/* If color keying is enabled update the alpha test, it depends on the existence
* of a color key in stage 0
*/
state_alpha(WINED3DRS_COLORKEYENABLE, stateblock, context);
}
} /* Otherwise tex_colorop disables the stage */
glBindTexture(GL_TEXTURE_2D, stateblock->wineD3DDevice->dummyTextureName[sampler]);
checkGLcall("glBindTexture(GL_TEXTURE_2D, stateblock->wineD3DDevice->dummyTextureName[sampler])");