Module: wine Branch: master Commit: 27c98fd6287df0595842eba8d5ef507316187f7b URL: http://source.winehq.org/git/wine.git/?a=commit;h=27c98fd6287df0595842eba8d5...
Author: Alexander Dorofeyev alexd4@inbox.lv Date: Thu Dec 27 00:23:59 2007 -0800
wined3d: Also update alpha test when stage texture is NULL.
---
dlls/wined3d/state.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 08ad5c2..8e9e19b 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -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])");