mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 03:40:20 +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()) {
|
if (!_texturesLoaded && _model->getGeometry() && _model->getGeometry()->areTexturesLoaded()) {
|
||||||
_texturesLoaded = true;
|
_texturesLoaded = true;
|
||||||
|
if (!_modelTextures.isEmpty()) {
|
||||||
|
_model->setTextures(_modelTextures);
|
||||||
|
}
|
||||||
_model->updateRenderItems();
|
_model->updateRenderItems();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,8 +224,7 @@ void ModelOverlay::setProperties(const QVariantMap& properties) {
|
||||||
if (texturesValue.isValid() && texturesValue.canConvert(QVariant::Map)) {
|
if (texturesValue.isValid() && texturesValue.canConvert(QVariant::Map)) {
|
||||||
_texturesLoaded = false;
|
_texturesLoaded = false;
|
||||||
QVariantMap textureMap = texturesValue.toMap();
|
QVariantMap textureMap = texturesValue.toMap();
|
||||||
QMetaObject::invokeMethod(_model.get(), "setTextures", Qt::AutoConnection,
|
_modelTextures = textureMap;
|
||||||
Q_ARG(const QVariantMap&, textureMap));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto groupCulledValue = properties["isGroupCulled"];
|
auto groupCulledValue = properties["isGroupCulled"];
|
||||||
|
|
Loading…
Reference in a new issue