avoid the case that "hasAmbient" use before assign

This commit is contained in:
tangziwen 2014-12-03 16:00:52 +08:00
parent 16ce7ac50f
commit da8dc13601
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)