Commit f89fdb44 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

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.
parent 7173a561
......@@ -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;
......
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