diff --git a/interface/src/Application.h b/interface/src/Application.h
index 762ac9585a..2c40cf5a16 100644
--- a/interface/src/Application.h
+++ b/interface/src/Application.h
@@ -468,6 +468,8 @@ public slots:
QString getGraphicsCardType();
+ bool gpuTextureMemSizeStable();
+
private slots:
void onDesktopRootItemCreated(QQuickItem* qmlContext);
void onDesktopRootContextCreated(QQmlContext* qmlContext);
@@ -562,7 +564,6 @@ private:
bool importFromZIP(const QString& filePath);
bool importImage(const QString& urlString);
- bool gpuTextureMemSizeStable();
int processOctreeStats(ReceivedMessage& message, SharedNodePointer sendingNode);
void trackIncomingOctreePacket(ReceivedMessage& message, SharedNodePointer sendingNode, bool wasStatsPacket);
diff --git a/libraries/entities/src/EntityScriptingInterface.cpp b/libraries/entities/src/EntityScriptingInterface.cpp
index ca914731b5..7ed0d73130 100644
--- a/libraries/entities/src/EntityScriptingInterface.cpp
+++ b/libraries/entities/src/EntityScriptingInterface.cpp
@@ -1026,6 +1026,12 @@ bool EntityScriptingInterface::isLoaded(const QUuid& id) {
return toReturn;
}
+bool EntityScriptingInterface::isTextureLoadingComplete() {
+ bool result;
+ QMetaObject::invokeMethod(qApp, "gpuTextureMemSizeStable", Qt::DirectConnection, Q_RETURN_ARG(bool, result));
+ return result;
+}
+
bool EntityScriptingInterface::isAddedEntity(const QUuid& id) {
bool toReturn = false;
_entityTree->withReadLock([&] {
diff --git a/libraries/entities/src/EntityScriptingInterface.h b/libraries/entities/src/EntityScriptingInterface.h
index f6aedac3fc..38d601a6c6 100644
--- a/libraries/entities/src/EntityScriptingInterface.h
+++ b/libraries/entities/src/EntityScriptingInterface.h
@@ -395,6 +395,13 @@ public slots:
*/
Q_INVOKABLE bool isLoaded(const QUuid& id);
+ /**jsdoc
+ * Check whether all textures have been loaded.
+ * @function Entities.areTexturesLoaded
+ * @returns {boolean} true
texture memory usage is not increasing false
.
+ */
+ Q_INVOKABLE bool isTextureLoadingComplete();
+
/**jsdoc
* Check if there is an object of a given ID.
* @function Entities.isAddedEntity