mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 11:42:55 +02:00
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
//
|
|
// Stats.h
|
|
// interface/src/ui
|
|
//
|
|
// Created by Lucas Crisman on 22/03/14.
|
|
// Copyright 2013 High Fidelity, Inc.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#ifndef hifi_Stats_h
|
|
#define hifi_Stats_h
|
|
|
|
#include <QObject>
|
|
|
|
#include <RenderArgs.h>
|
|
|
|
class Stats: public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static Stats* getInstance();
|
|
|
|
Stats();
|
|
|
|
static void drawBackground(unsigned int rgba, int x, int y, int width, int height);
|
|
|
|
void toggleExpanded();
|
|
bool isExpanded() { return _expanded; }
|
|
|
|
void checkClick(int mouseX, int mouseY, int mouseDragStartedX, int mouseDragStartedY, int horizontalOffset);
|
|
void resetWidth(int width, int horizontalOffset);
|
|
void display(const float* color, int horizontalOffset, float fps, int inPacketsPerSecond, int outPacketsPerSecond,
|
|
int inKbitsPerSecond, int outKbitsPerSecond, int voxelPacketsToProcess);
|
|
bool includeTimingRecord(const QString& name);
|
|
|
|
void setRenderDetails(const RenderDetails& details) { _renderDetails = details; }
|
|
|
|
private:
|
|
static Stats* _sharedInstance;
|
|
|
|
bool _expanded;
|
|
|
|
int _recentMaxPackets; // recent max incoming voxel packets to process
|
|
bool _resetRecentMaxPacketsSoon;
|
|
|
|
int _generalStatsWidth;
|
|
int _bandwidthStatsWidth;
|
|
int _pingStatsWidth;
|
|
int _geoStatsWidth;
|
|
int _octreeStatsWidth;
|
|
|
|
int _lastHorizontalOffset;
|
|
|
|
RenderDetails _renderDetails;
|
|
};
|
|
|
|
#endif // hifi_Stats_h
|