Merge pull request #170 from tangziwen/v3

avoid the case that "hasAmbient" use before assign
This commit is contained in:
XiaoYang 2014-12-04 09:51:22 +08:00
commit 71077e6f65
1 changed files with 1 additions and 1 deletions

View File

@ -460,7 +460,7 @@ void MeshCommand::setLightUniforms()
else // normal does not exist
{
Vec3 ambient(0.0f, 0.0f, 0.0f);
bool hasAmbient;
bool hasAmbient = false;
for (const auto& light : lights)
{
if (light->getLightType() == LightType::AMBIENT)