Added more render control options, wireframe option works, added more hacks.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@988 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox
2008-10-28 08:14:17 +00:00
parent 09a0b34ce1
commit 46f0dd8f78
8 changed files with 173 additions and 28 deletions

View File

@ -342,18 +342,37 @@ void EnableComponents(u32 components)
}
// tex
for (int i = 0; i < 8; ++i) {
if ((components & (VB_HAS_UV0 << i)) != (s_prevcomponents & (VB_HAS_UV0 << i))) {
glClientActiveTexture(GL_TEXTURE0 + i);
if (components & (VB_HAS_UV0 << i))
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
else
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
}
}
if (!g_Config.bDisableTexturing) {
for (int i = 0; i < 8; ++i) {
if ((components & (VB_HAS_UV0 << i)) != (s_prevcomponents & (VB_HAS_UV0 << i))) {
glClientActiveTexture(GL_TEXTURE0 + i);
if (components & (VB_HAS_UV0 << i))
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
else
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
}
}
}
else // Disable Texturing
{
for (int i = 0; i < 8; ++i) {
glClientActiveTexture(GL_TEXTURE0 + i);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
}
}
s_prevcomponents = components;
}
// Disable Lighting
// TODO - move to better spot
if (g_Config.bDisableLighting) {
for (int i = 0; i < xfregs.nNumChans; i++)
{
xfregs.colChans[i].alpha.enablelighting = false;
xfregs.colChans[i].color.enablelighting = false;
}
}
s_prevcomponents = components;
}
}
} // namespace