mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:03:35 +02:00
adding profiling on the script engine call back to timer event
This commit is contained in:
parent
189ad9c706
commit
c35be446e6
3 changed files with 2 additions and 3 deletions
|
@ -1874,7 +1874,7 @@ void Application::initializeGL() {
|
||||||
render::CullFunctor cullFunctor = LODManager::shouldRender;
|
render::CullFunctor cullFunctor = LODManager::shouldRender;
|
||||||
static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
|
static const QString RENDER_FORWARD = "HIFI_RENDER_FORWARD";
|
||||||
bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);
|
bool isDeferred = !QProcessEnvironment::systemEnvironment().contains(RENDER_FORWARD);
|
||||||
// _renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraFrame", cullFunctor);
|
_renderEngine->addJob<SecondaryCameraRenderTask>("SecondaryCameraFrame", cullFunctor);
|
||||||
_renderEngine->addJob<RenderViewTask>("RenderMainView", cullFunctor, isDeferred);
|
_renderEngine->addJob<RenderViewTask>("RenderMainView", cullFunctor, isDeferred);
|
||||||
_renderEngine->load();
|
_renderEngine->load();
|
||||||
_renderEngine->registerScene(_main3DScene);
|
_renderEngine->registerScene(_main3DScene);
|
||||||
|
|
|
@ -63,6 +63,4 @@ void EngineStats::run(const RenderContextPointer& renderContext) {
|
||||||
|
|
||||||
config->frameSetPipelineCount = _gpuStats._PSNumSetPipelines;
|
config->frameSetPipelineCount = _gpuStats._PSNumSetPipelines;
|
||||||
config->frameSetInputFormatCount = _gpuStats._ISNumFormatChanges;
|
config->frameSetInputFormatCount = _gpuStats._ISNumFormatChanges;
|
||||||
|
|
||||||
config->emitDirty();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1284,6 +1284,7 @@ void ScriptEngine::timerFired() {
|
||||||
|
|
||||||
// call the associated JS function, if it exists
|
// call the associated JS function, if it exists
|
||||||
if (timerData.function.isValid()) {
|
if (timerData.function.isValid()) {
|
||||||
|
PROFILE_RANGE(script, __FUNCTION__);
|
||||||
auto preTimer = p_high_resolution_clock::now();
|
auto preTimer = p_high_resolution_clock::now();
|
||||||
callWithEnvironment(timerData.definingEntityIdentifier, timerData.definingSandboxURL, timerData.function, timerData.function, QScriptValueList());
|
callWithEnvironment(timerData.definingEntityIdentifier, timerData.definingSandboxURL, timerData.function, timerData.function, QScriptValueList());
|
||||||
auto postTimer = p_high_resolution_clock::now();
|
auto postTimer = p_high_resolution_clock::now();
|
||||||
|
|
Loading…
Reference in a new issue