mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
put back brad's voxel stats, he loves them too much
This commit is contained in:
parent
588fc67cb9
commit
44cb57afad
3 changed files with 31 additions and 4 deletions
|
@ -102,15 +102,15 @@ long int VoxelSystem::getVoxelsColored() {
|
|||
}
|
||||
|
||||
float VoxelSystem::getVoxelsColoredPerSecondAverage() {
|
||||
return tree->voxelsColoredStats.getEventDeltaAverage();
|
||||
return (1 / tree->voxelsColoredStats.getEventDeltaAverage());
|
||||
}
|
||||
|
||||
long int VoxelSystem::getVoxelsBytesRead() {
|
||||
return tree->voxelsBytesRead;
|
||||
}
|
||||
|
||||
float VoxelSystem::getVoxelsBytesReadAverage() {
|
||||
return tree->voxelsBytesReadStats.getAverage();
|
||||
float VoxelSystem::getVoxelsBytesReadPerSecondAverage() {
|
||||
return tree->voxelsBytesReadStats.getAverageSampleValuePerSecond();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
long int getVoxelsBytesRead();
|
||||
float getVoxelsCreatedPerSecondAverage();
|
||||
float getVoxelsColoredPerSecondAverage();
|
||||
float getVoxelsBytesReadAverage();
|
||||
float getVoxelsBytesReadPerSecondAverage();
|
||||
|
||||
private:
|
||||
int voxelsRendered;
|
||||
|
|
|
@ -236,6 +236,33 @@ void displayStats(void)
|
|||
sprintf(stats, "FPS = %3.0f Pkts/s = %d Bytes/s = %d Head(x,y,z)= %4.2f, %4.2f, %4.2f ",
|
||||
FPS, packetsPerSecond, bytesPerSecond, avatarPos.x,avatarPos.y,avatarPos.z);
|
||||
drawtext(10, statsVerticalOffset + 49, 0.10f, 0, 1.0, 0, stats);
|
||||
|
||||
std::stringstream voxelStats;
|
||||
voxelStats << "Voxels Rendered: " << voxels.getVoxelsRendered();
|
||||
drawtext(10, statsVerticalOffset + 70, 0.10f, 0, 1.0, 0, (char *)voxelStats.str().c_str());
|
||||
|
||||
voxelStats.str("");
|
||||
voxelStats << "Voxels Created: " << voxels.getVoxelsCreated() << " (" << voxels.getVoxelsCreatedPerSecondAverage()
|
||||
<< "/sec) ";
|
||||
drawtext(10, statsVerticalOffset + 250, 0.10f, 0, 1.0, 0, (char *)voxelStats.str().c_str());
|
||||
|
||||
voxelStats.str("");
|
||||
voxelStats << "Voxels Colored: " << voxels.getVoxelsColored() << " (" << voxels.getVoxelsColoredPerSecondAverage()
|
||||
<< "/sec) ";
|
||||
drawtext(10, statsVerticalOffset + 270, 0.10f, 0, 1.0, 0, (char *)voxelStats.str().c_str());
|
||||
|
||||
voxelStats.str("");
|
||||
voxelStats << "Voxels Bytes Read: " << voxels.getVoxelsBytesRead()
|
||||
<< " (" << voxels.getVoxelsBytesReadPerSecondAverage() << " Bps)";
|
||||
drawtext(10, statsVerticalOffset + 290,0.10f, 0, 1.0, 0, (char *)voxelStats.str().c_str());
|
||||
|
||||
voxelStats.str("");
|
||||
float voxelsBytesPerColored = voxels.getVoxelsColored()
|
||||
? ((float) voxels.getVoxelsBytesRead() / voxels.getVoxelsColored())
|
||||
: 0;
|
||||
|
||||
voxelStats << "Voxels Bytes per Colored: " << voxelsBytesPerColored;
|
||||
drawtext(10, statsVerticalOffset + 310, 0.10f, 0, 1.0, 0, (char *)voxelStats.str().c_str());
|
||||
|
||||
if (::perfStatsOn) {
|
||||
// Get the PerfStats group details. We need to allocate and array of char* long enough to hold 1+groups
|
||||
|
|
Loading…
Reference in a new issue