Add GPU buffer and texture current counts to the main stats display

This commit is contained in:
Brad Davis 2016-10-17 14:02:14 -07:00
parent aec76cd542
commit 1e9c369660
3 changed files with 17 additions and 0 deletions

View file

@ -246,6 +246,16 @@ Item {
text: "Triangles: " + root.triangles +
" / Material Switches: " + root.materialSwitches
}
Text {
color: root.fontColor;
font.pixelSize: root.fontSize
text: "GPU Textures: " + root.gpuTextures;
}
Text {
color: root.fontColor;
font.pixelSize: root.fontSize
text: "GPU Buffers: " + root.gpuBuffers;
}
Text {
color: root.fontColor;
font.pixelSize: root.fontSize

View file

@ -285,6 +285,9 @@ void Stats::updateStats(bool force) {
STAT_UPDATE(sendingMode, sendingModeResult);
}
STAT_UPDATE(gpuBuffers, (int)gpu::Context::getBufferGPUCount());
STAT_UPDATE(gpuTextures, (int)gpu::Context::getTextureGPUCount());
// Incoming packets
QLocale locale(QLocale::English);
auto voxelPacketsToProcess = qApp->getOctreePacketProcessor().packetsToProcessCount();

View file

@ -89,6 +89,8 @@ class Stats : public QQuickItem {
STATS_PROPERTY(int, localElements, 0)
STATS_PROPERTY(int, localInternal, 0)
STATS_PROPERTY(int, localLeaves, 0)
STATS_PROPERTY(int, gpuBuffers, 0)
STATS_PROPERTY(int, gpuTextures, 0)
public:
static Stats* getInstance();
@ -177,6 +179,8 @@ signals:
void localInternalChanged();
void localLeavesChanged();
void timingStatsChanged();
void gpuBuffersChanged();
void gpuTexturesChanged();
private:
int _recentMaxPackets{ 0 } ; // recent max incoming voxel packets to process