Fix "Disable Lighting" in D3D9 and D3D11.
Fixes issue 3185. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7498 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8791c1c372
commit
fe2d09576d
|
@ -11,6 +11,7 @@
|
||||||
#include "RenderBase.h"
|
#include "RenderBase.h"
|
||||||
|
|
||||||
#include "VertexManagerBase.h"
|
#include "VertexManagerBase.h"
|
||||||
|
#include "VideoConfig.h"
|
||||||
|
|
||||||
VertexManager *g_vertex_manager;
|
VertexManager *g_vertex_manager;
|
||||||
|
|
||||||
|
@ -158,6 +159,16 @@ void VertexManager::AddVertices(int primitive, int numVertices)
|
||||||
|
|
||||||
void VertexManager::Flush()
|
void VertexManager::Flush()
|
||||||
{
|
{
|
||||||
|
// Disable Lighting
|
||||||
|
// TODO - Is this a good spot for this code?
|
||||||
|
if (g_ActiveConfig.bDisableLighting)
|
||||||
|
{
|
||||||
|
for (u32 i = 0; i < xfregs.numChan.numColorChans; i++)
|
||||||
|
{
|
||||||
|
xfregs.alpha[i].enablelighting = false;
|
||||||
|
xfregs.color[i].enablelighting = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
g_vertex_manager->vFlush();
|
g_vertex_manager->vFlush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -289,17 +289,6 @@ void GLVertexFormat::EnableComponents(u32 components)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable Lighting
|
|
||||||
// TODO - Is this a good spot for this code?
|
|
||||||
if (g_ActiveConfig.bDisableLighting)
|
|
||||||
{
|
|
||||||
for (u32 i = 0; i < xfregs.numChan.numColorChans; i++)
|
|
||||||
{
|
|
||||||
xfregs.alpha[i].enablelighting = false;
|
|
||||||
xfregs.color[i].enablelighting = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
s_prevcomponents = components;
|
s_prevcomponents = components;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue