Commit 612a74a9 authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Don't set Parm when isDiffuseSupplied is FALSE in state_colormat(), it isn't used anyway.

parent d4ca34dd
......@@ -812,7 +812,7 @@ static void state_fogdensity(DWORD state, IWineD3DStateBlockImpl *stateblock) {
/* TODO: Merge with primitive type + init_materials()!! */
static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock) {
GLenum Parm = -1;
GLenum Parm = 0;
WineDirect3DStridedData *diffuse = &stateblock->wineD3DDevice->strided_streams.u.s.diffuse;
BOOL isDiffuseSupplied;
......@@ -825,7 +825,7 @@ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock) {
isDiffuseSupplied = diffuse->lpData || diffuse->VBO;
if (stateblock->renderState[WINED3DRS_COLORVERTEX]) {
if (isDiffuseSupplied && stateblock->renderState[WINED3DRS_COLORVERTEX]) {
TRACE("diff %d, amb %d, emis %d, spec %d\n",
stateblock->renderState[WINED3DRS_DIFFUSEMATERIALSOURCE],
stateblock->renderState[WINED3DRS_AMBIENTMATERIALSOURCE],
......@@ -847,7 +847,7 @@ static void state_colormat(DWORD state, IWineD3DStateBlockImpl *stateblock) {
}
}
if(Parm == -1 || !isDiffuseSupplied) {
if(!Parm) {
glDisable(GL_COLOR_MATERIAL);
checkGLcall("glDisable GL_COLOR_MATERIAL");
} else {
......
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