From ec69fd38ebe18eac4e4de035b917ac3c902ed767 Mon Sep 17 00:00:00 2001 From: NissimHadar Date: Tue, 23 Apr 2019 12:26:13 -0700 Subject: [PATCH] Added set minimum GPU texture memory cycles to API. --- interface/src/scripting/TestScriptingInterface.cpp | 5 ++++- interface/src/scripting/TestScriptingInterface.h | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/interface/src/scripting/TestScriptingInterface.cpp b/interface/src/scripting/TestScriptingInterface.cpp index 7d16fefc8c..387a58a4f7 100644 --- a/interface/src/scripting/TestScriptingInterface.cpp +++ b/interface/src/scripting/TestScriptingInterface.cpp @@ -200,9 +200,12 @@ int TestScriptingInterface::getOtherAvatarsReplicaCount() { return qApp->getOtherAvatarsReplicaCount(); } +void TestScriptingInterface::setMinimumGPUTextureMemStabilityCount(int count) { + qApp->setMinimumGPUTextureMemStabilityCount(count); +} + bool TestScriptingInterface::isTextureLoadingComplete() { bool result; - qApp->setMinimumGPUTextureMemStabilityCount(2); QMetaObject::invokeMethod(qApp, "gpuTextureMemSizeStable", Qt::DirectConnection, Q_RETURN_ARG(bool, result)); return result; } diff --git a/interface/src/scripting/TestScriptingInterface.h b/interface/src/scripting/TestScriptingInterface.h index 7924476305..bb53f93012 100644 --- a/interface/src/scripting/TestScriptingInterface.h +++ b/interface/src/scripting/TestScriptingInterface.h @@ -163,6 +163,13 @@ public slots: */ Q_INVOKABLE int getOtherAvatarsReplicaCount(); + /**jsdoc + * Set number of cycles texture size is required to be stable + * @function Entities.setMinimumGPUTextureMemStabilityCount + * @param {number} count - Number of cycles to wait + */ + Q_INVOKABLE void setMinimumGPUTextureMemStabilityCount(int count); + /**jsdoc * Check whether all textures have been loaded. * @function Entities.isTextureLoadingComplete