mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Moved API call to Test interface.
This commit is contained in:
parent
303dabd93c
commit
670fb017f3
4 changed files with 13 additions and 13 deletions
|
@ -199,3 +199,9 @@ void TestScriptingInterface::setOtherAvatarsReplicaCount(int count) {
|
|||
int TestScriptingInterface::getOtherAvatarsReplicaCount() {
|
||||
return qApp->getOtherAvatarsReplicaCount();
|
||||
}
|
||||
|
||||
bool TestScriptingInterface::isTextureLoadingComplete() {
|
||||
bool result;
|
||||
QMetaObject::invokeMethod(qApp, "gpuTextureMemSizeStable", Qt::DirectConnection, Q_RETURN_ARG(bool, result));
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -163,6 +163,13 @@ public slots:
|
|||
*/
|
||||
Q_INVOKABLE int getOtherAvatarsReplicaCount();
|
||||
|
||||
/**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();
|
||||
|
||||
private:
|
||||
bool waitForCondition(qint64 maxWaitMs, std::function<bool()> condition);
|
||||
QString _testResultsLocation;
|
||||
|
|
|
@ -1026,12 +1026,6 @@ 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,13 +395,6 @@ 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