Fix texture count and size getting stuck on 0

This commit is contained in:
David Rowe 2016-09-13 13:03:06 +12:00
parent d61e4c5c11
commit 0cf3f6e953

View file

@ -162,7 +162,7 @@ void Model::setOffset(const glm::vec3& offset) {
} }
void Model::calculateTextureInfo() { void Model::calculateTextureInfo() {
if (!_hasCalculatedTextureInfo && isLoaded() && getGeometry()->areTexturesLoaded()) { if (!_hasCalculatedTextureInfo && isLoaded() && getGeometry()->areTexturesLoaded() && !_modelMeshRenderItems.isEmpty()) {
size_t textureSize = 0; size_t textureSize = 0;
int textureCount = 0; int textureCount = 0;
bool allTexturesLoaded = true; bool allTexturesLoaded = true;