Update Model::_hasTransparentTextures

This commit is contained in:
Zach Pomerantz 2016-03-27 16:38:45 -07:00
parent b90f2b2e0a
commit d6640ac520
2 changed files with 4 additions and 2 deletions

View file

@ -79,7 +79,9 @@ bool Model::needsFixupInScene() const {
// Once textures are loaded, fixup if they are now transparent // Once textures are loaded, fixup if they are now transparent
if (_needsUpdateTransparentTextures && _geometry->getGeometry()->areTexturesLoaded()) { if (_needsUpdateTransparentTextures && _geometry->getGeometry()->areTexturesLoaded()) {
_needsUpdateTransparentTextures = false; _needsUpdateTransparentTextures = false;
if (_hasTransparentTextures != _geometry->getGeometry()->hasTransparentTextures()) { bool hasTransparentTextures = _geometry->getGeometry()->hasTransparentTextures();
if (_hasTransparentTextures != hasTransparentTextures) {
_hasTransparentTextures = hasTransparentTextures;
return true; return true;
} }
} }

View file

@ -379,7 +379,7 @@ protected:
bool _needsReload { true }; bool _needsReload { true };
bool _needsUpdateClusterMatrices { true }; bool _needsUpdateClusterMatrices { true };
mutable bool _needsUpdateTransparentTextures { true }; mutable bool _needsUpdateTransparentTextures { true };
bool _hasTransparentTextures { false }; mutable bool _hasTransparentTextures { false };
bool _showCollisionHull { false }; bool _showCollisionHull { false };
friend class ModelMeshPartPayload; friend class ModelMeshPartPayload;