diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /engine/vgui_texturebudgetpanel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'engine/vgui_texturebudgetpanel.h')
| -rw-r--r-- | engine/vgui_texturebudgetpanel.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/engine/vgui_texturebudgetpanel.h b/engine/vgui_texturebudgetpanel.h new file mode 100644 index 0000000..955d45f --- /dev/null +++ b/engine/vgui_texturebudgetpanel.h @@ -0,0 +1,62 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef VGUI_TEXTUREBUDGETPANEL_H +#define VGUI_TEXTUREBUDGETPANEL_H + +#ifdef _WIN32 +#pragma once +#endif + +#include "vgui/vgui_basebudgetpanel.h" +#include "tier0/vprof.h" + +#ifdef VPROF_ENABLED + +class CTextureBudgetPanel : public CBaseBudgetPanel +{ +public: + typedef CBaseBudgetPanel BaseClass; + + CTextureBudgetPanel( vgui::Panel *pParent, const char *pElementName ); + ~CTextureBudgetPanel(); + + void OnCVarStateChanged(); + + +// CBaseBudgetPanel overrides. +public: + virtual void SetTimeLabelText(); + virtual void SetHistoryLabelText(); + virtual void ResetAll(); + + +// VGUI overrides. +public: + virtual void OnTick( void ); + virtual void Paint(); + virtual void PerformLayout(); + + +// Internal. +private: + + void SnapshotTextureHistory(); + void SendConfigDataToBase(); + CounterGroup_t GetCurrentCounterGroup() const; + CON_COMMAND_MEMBER_F( CTextureBudgetPanel, "showbudget_texture_global_dumpstats", DumpGlobalTextureStats, "Dump all items in +showbudget_texture_global in a text form", 0 ); + +private: + + vgui::Label *m_pModeLabel; + int m_LastCounterGroup; + int m_MaxValue; + int m_SumOfValues; +}; + +#endif // VPROF_ENABLED + +#endif // VGUI_TEXTUREBUDGETPANEL_H |