Module: wine
Branch: master
Commit: 663e5a6a4cd43ec502f4c1122604007e1af1b67a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=663e5a6a4cd43ec502f4c1122…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Thu Mar 26 10:43:40 2009 +0100
wined3d: Simplify the "transformed" check in state_lighting().
It doesn't really matter if lighting is enabled or not if we don't have
position data.
---
dlls/wined3d/state.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 6035c71..ab18459 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -81,8 +81,6 @@ static void state_fillmode(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
}
static void state_lighting(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
- BOOL transformed;
-
/* Lighting is not enabled if transformed vertices are drawn
* but lighting does not affect the stream sources, so it is not grouped for performance reasons.
* This state reads the decoded vertex declaration, so if it is dirty don't do anything. The
@@ -93,11 +91,9 @@ static void state_lighting(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
return;
}
- transformed = ((stateblock->wineD3DDevice->strided_streams.u.s.position.lpData != NULL ||
- stateblock->wineD3DDevice->strided_streams.u.s.position.VBO != 0) &&
- stateblock->wineD3DDevice->strided_streams.position_transformed) ? TRUE : FALSE;
-
- if (stateblock->renderState[WINED3DRS_LIGHTING] && !transformed) {
+ if (stateblock->renderState[WINED3DRS_LIGHTING]
+ && !stateblock->wineD3DDevice->strided_streams.position_transformed)
+ {
glEnable(GL_LIGHTING);
checkGLcall("glEnable GL_LIGHTING");
} else {