Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef VGUI_TEXTUREBUDGETPANEL_H
  7. #define VGUI_TEXTUREBUDGETPANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui/vgui_basebudgetpanel.h"
  12. #include "tier0/vprof.h"
  13. #ifdef VPROF_ENABLED
  14. class CTextureBudgetPanel : public CBaseBudgetPanel
  15. {
  16. public:
  17. typedef CBaseBudgetPanel BaseClass;
  18. CTextureBudgetPanel( vgui::Panel *pParent, const char *pElementName );
  19. ~CTextureBudgetPanel();
  20. void OnCVarStateChanged();
  21. // CBaseBudgetPanel overrides.
  22. public:
  23. virtual void SetTimeLabelText();
  24. virtual void SetHistoryLabelText();
  25. virtual void ResetAll();
  26. // VGUI overrides.
  27. public:
  28. virtual void OnTick( void );
  29. virtual void Paint();
  30. virtual void PerformLayout();
  31. // Internal.
  32. private:
  33. void SnapshotTextureHistory();
  34. void SendConfigDataToBase();
  35. CounterGroup_t GetCurrentCounterGroup() const;
  36. CON_COMMAND_MEMBER_F( CTextureBudgetPanel, "showbudget_texture_global_dumpstats", DumpGlobalTextureStats, "Dump all items in +showbudget_texture_global in a text form", 0 );
  37. private:
  38. vgui::Label *m_pModeLabel;
  39. int m_LastCounterGroup;
  40. int m_MaxValue;
  41. int m_SumOfValues;
  42. };
  43. #endif // VPROF_ENABLED
  44. #endif // VGUI_TEXTUREBUDGETPANEL_H