mirror of https://github.com/axmolengine/axmol.git
fix light check
This commit is contained in:
parent
02489ecad6
commit
90523fc3d5
|
@ -528,10 +528,9 @@ void Sprite3D::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
|
||||||
bool usingLight = false;
|
bool usingLight = false;
|
||||||
Color4F ambient(0.f, 0.f, 0.f, 1.f);
|
Color4F ambient(0.f, 0.f, 0.f, 1.f);
|
||||||
for (const auto light : lights) {
|
for (const auto light : lights) {
|
||||||
if (((unsigned short)light->getLightFlag() & _lightMask) > 0)
|
usingLight = ((unsigned short)light->getLightFlag() & _lightMask) > 0;
|
||||||
{
|
if (usingLight)
|
||||||
usingLight = true;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (usingLight != _shaderUsingLight)
|
if (usingLight != _shaderUsingLight)
|
||||||
genGLProgramState();
|
genGLProgramState();
|
||||||
|
|
Loading…
Reference in New Issue