Use count of textures actually rendered

Textures specified in model may be invalid and so not actually rendered.
This commit is contained in:
David Rowe 2016-09-03 13:07:00 +12:00
parent 980df19db1
commit 17d30796cc

View file

@ -590,11 +590,9 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
renderInfo.setProperty("texturesSize", (int)getRenderInfoTextureSize()); // FIXME - theoretically the size of textures could be > max int
renderInfo.setProperty("hasTransparent", getRenderInfoHasTransparent());
renderInfo.setProperty("drawCalls", getRenderInfoDrawCalls());
renderInfo.setProperty("texturesCount", getRenderInfoTextureCount());
}
if (_type == EntityTypes::Model || _type == EntityTypes::PolyLine || _type == EntityTypes::ParticleEffect) {
renderInfo.setProperty("texturesCount", QScriptValue(_textureNames.count()));
}
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER_NO_SKIP(renderInfo, renderInfo); // Gettable but not settable
}