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:
parent
7173a56161
commit
f89fdb4429
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue