mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 22:08:27 +02:00
attempt to fix first time model overlay loading
This commit is contained in:
parent
df0ecb44a8
commit
310e2ee063
1 changed files with 4 additions and 2 deletions
|
@ -123,6 +123,9 @@ void ModelOverlay::update(float deltatime) {
|
|||
|
||||
if (!_texturesLoaded && _model->getGeometry() && _model->getGeometry()->areTexturesLoaded()) {
|
||||
_texturesLoaded = true;
|
||||
if (!_modelTextures.isEmpty()) {
|
||||
_model->setTextures(_modelTextures);
|
||||
}
|
||||
_model->updateRenderItems();
|
||||
}
|
||||
}
|
||||
|
@ -221,8 +224,7 @@ void ModelOverlay::setProperties(const QVariantMap& properties) {
|
|||
if (texturesValue.isValid() && texturesValue.canConvert(QVariant::Map)) {
|
||||
_texturesLoaded = false;
|
||||
QVariantMap textureMap = texturesValue.toMap();
|
||||
QMetaObject::invokeMethod(_model.get(), "setTextures", Qt::AutoConnection,
|
||||
Q_ARG(const QVariantMap&, textureMap));
|
||||
_modelTextures = textureMap;
|
||||
}
|
||||
|
||||
auto groupCulledValue = properties["isGroupCulled"];
|
||||
|
|
Loading…
Reference in a new issue