wined3d: Don't reapply lighting when vertex shaders are used.

If a vertex shader is used the GL_LIGHTING state is ignored. If the
shader is turned off state_vdecl is called anyway, so it will adjust the
lighting state to match the available fixed function vertex attributes.
This commit is contained in:
Stefan Dösinger 2010-10-29 18:15:23 +02:00 committed by Alexandre Julliard
parent 7173a56161
commit f89fdb4429
1 changed files with 3 additions and 5 deletions

View File

@ -4630,11 +4630,6 @@ static void vertexdeclaration(DWORD state_id, IWineD3DStateBlockImpl *stateblock
updateFog = TRUE;
}
/* Reapply lighting if it is not scheduled for reapplication already */
if(!isStateDirty(context, STATE_RENDER(WINED3DRS_LIGHTING))) {
state_lighting(STATE_RENDER(WINED3DRS_LIGHTING), stateblock, context);
}
if (transformed) {
context->last_was_rhw = TRUE;
} else {
@ -4677,6 +4672,9 @@ static void vertexdeclaration(DWORD state_id, IWineD3DStateBlockImpl *stateblock
if(!isStateDirty(context, STATE_RENDER(WINED3DRS_COLORVERTEX))) {
state_colormat(STATE_RENDER(WINED3DRS_COLORVERTEX), stateblock, context);
}
if(!isStateDirty(context, STATE_RENDER(WINED3DRS_LIGHTING))) {
state_lighting(STATE_RENDER(WINED3DRS_LIGHTING), stateblock, context);
}
if(context->last_was_vshader) {
updateFog = TRUE;