mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Added Script command to test if GPU memory size is stable.
This commit is contained in:
parent
f926298020
commit
303dabd93c
3 changed files with 15 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
|
@ -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([&] {
|
||||
|
|
|
@ -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} <code>true</code> texture memory usage is not increasing <code>false</code>.
|
||||
*/
|
||||
Q_INVOKABLE bool isTextureLoadingComplete();
|
||||
|
||||
/**jsdoc
|
||||
* Check if there is an object of a given ID.
|
||||
* @function Entities.isAddedEntity
|
||||
|
|
Loading…
Reference in a new issue