mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Expose the runtime from the engine in Stats
This commit is contained in:
parent
5af171f69f
commit
2c16b2bf3a
3 changed files with 8 additions and 4 deletions
|
@ -244,16 +244,16 @@ Item {
|
|||
id: octreeCol
|
||||
spacing: 4; x: 4; y: 4;
|
||||
StatText {
|
||||
text: " Frame timing:"
|
||||
text: "Engine: " + root.engineFrameTime.toFixed(1) + " ms"
|
||||
}
|
||||
StatText {
|
||||
text: " Batch: " + root.batchFrameTime.toFixed(1) + " ms"
|
||||
text: "Batch: " + root.batchFrameTime.toFixed(1) + " ms"
|
||||
}
|
||||
StatText {
|
||||
text: " GPU: " + root.gpuFrameTime.toFixed(1) + " ms"
|
||||
text: "GPU: " + root.gpuFrameTime.toFixed(1) + " ms"
|
||||
}
|
||||
StatText {
|
||||
text: " Avatar: " + root.avatarSimulationTime.toFixed(1) + " ms"
|
||||
text: "Avatar: " + root.avatarSimulationTime.toFixed(1) + " ms"
|
||||
}
|
||||
StatText {
|
||||
text: "Triangles: " + root.triangles +
|
||||
|
|
|
@ -335,6 +335,8 @@ void Stats::updateStats(bool force) {
|
|||
// Update Frame timing (in ms)
|
||||
STAT_UPDATE(gpuFrameTime, (float)gpuContext->getFrameTimerGPUAverage());
|
||||
STAT_UPDATE(batchFrameTime, (float)gpuContext->getFrameTimerBatchAverage());
|
||||
auto config = qApp->getRenderEngine()->getConfiguration().get();
|
||||
STAT_UPDATE(engineFrameTime, (float) config->getCPURunTime());
|
||||
STAT_UPDATE(avatarSimulationTime, (float)avatarManager->getAvatarSimulationTime());
|
||||
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ class Stats : public QQuickItem {
|
|||
STATS_PROPERTY(int, gpuFreeMemory, 0)
|
||||
STATS_PROPERTY(float, gpuFrameTime, 0)
|
||||
STATS_PROPERTY(float, batchFrameTime, 0)
|
||||
STATS_PROPERTY(float, engineFrameTime, 0)
|
||||
STATS_PROPERTY(float, avatarSimulationTime, 0)
|
||||
|
||||
public:
|
||||
|
@ -250,6 +251,7 @@ signals:
|
|||
void gpuFreeMemoryChanged();
|
||||
void gpuFrameTimeChanged();
|
||||
void batchFrameTimeChanged();
|
||||
void engineFrameTimeChanged();
|
||||
void avatarSimulationTimeChanged();
|
||||
void rectifiedTextureCountChanged();
|
||||
void decimatedTextureCountChanged();
|
||||
|
|
Loading…
Reference in a new issue