mirror of https://github.com/axmolengine/axmol.git
Merge pull request #170 from tangziwen/v3
avoid the case that "hasAmbient" use before assign
This commit is contained in:
commit
71077e6f65
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue