Pioneer
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
Graphics::Stats Class Reference

#include <Stats.h>

Inheritance diagram for Graphics::Stats:
Inheritance graph
[legend]
Collaboration diagram for Graphics::Stats:
Collaboration graph
[legend]

Classes

struct  TFrameData
 

Public Types

enum  StatType {
  STAT_DRAWCALL = 0 , STAT_NUM_POINTS , STAT_NUM_LINES , STAT_NUM_TRIS ,
  STAT_CREATE_BUFFER , STAT_DESTROY_BUFFER , STAT_BUFFER_INUSE , STAT_DRAW_UNIFORM_BUFFER_INUSE ,
  STAT_DRAW_UNIFORM_BUFFER_ALLOCS , STAT_DYNAMIC_DRAW_BUFFER_INUSE , STAT_DYNAMIC_DRAW_BUFFER_CREATED , STAT_NUM_RENDER_STATES ,
  STAT_NUM_SHADER_PROGRAMS , STAT_NUM_CMDLIST_FLUSHES , STAT_BUILDINGS , STAT_CITIES ,
  STAT_GROUNDSTATIONS , STAT_SPACESTATIONS , STAT_ATMOSPHERES , STAT_PATCHES ,
  STAT_PLANETS , STAT_GASGIANTS , STAT_STARS , STAT_SHIPS ,
  STAT_BILLBOARD , STAT_NUM_TEXTURE2D , STAT_MEM_TEXTURE2D , STAT_NUM_TEXTURECUBE ,
  STAT_MEM_TEXTURECUBE , STAT_NUM_TEXTUREARRAY2D , STAT_MEM_TEXTUREARRAY2D , MAX_STAT
}
 

Public Member Functions

 Stats ()
 
 ~Stats ()
 
void AddToStatCount (const StatType type, const uint32_t count) const
 
void DecStatCount (const StatType type, const uint32_t count) const
 
void SetStatCount (const StatType type, const uint32_t count) const
 
void NextFrame ()
 
const TFrameDataFrameStatsPrevious () const
 
const FrameInfoGetFullStats () const
 

Static Public Attributes

static const Uint32 MAX_FRAMES_STORE = 30U
 

Additional Inherited Members

- Protected Types inherited from Perf::Stats
using FrameInfo = std::map< std::string, uint32_t >
 
- Protected Member Functions inherited from Perf::Stats
CounterRef GetOrCreateCounter (std::string name, bool resetOnNewFrame=true)
 
void CounterAdd (CounterRef ref, uint32_t amount=1) const
 
void CounterDec (CounterRef ref, uint32_t amount=1) const
 
void CounterSet (CounterRef ref, uint32_t value) const
 
void CounterReset (CounterRef ref) const
 
void EnableReset (bool enabled)
 
const FrameInfoGetFrameStats () const
 
std::string GetNameForCounter (CounterRef ref) const
 
void FlushFrame ()
 

Detailed Description

Graphics::Stats is a wrapper over a PerfStats instance. Use AddToStatCount(Stats::StatType, uint32_t) to easily update renderer stats.

Member Enumeration Documentation

◆ StatType

Enumerator
STAT_DRAWCALL 
STAT_NUM_POINTS 
STAT_NUM_LINES 
STAT_NUM_TRIS 
STAT_CREATE_BUFFER 
STAT_DESTROY_BUFFER 
STAT_BUFFER_INUSE 
STAT_DRAW_UNIFORM_BUFFER_INUSE 
STAT_DRAW_UNIFORM_BUFFER_ALLOCS 
STAT_DYNAMIC_DRAW_BUFFER_INUSE 
STAT_DYNAMIC_DRAW_BUFFER_CREATED 
STAT_NUM_RENDER_STATES 
STAT_NUM_SHADER_PROGRAMS 
STAT_NUM_CMDLIST_FLUSHES 
STAT_BUILDINGS 
STAT_CITIES 
STAT_GROUNDSTATIONS 
STAT_SPACESTATIONS 
STAT_ATMOSPHERES 
STAT_PATCHES 
STAT_PLANETS 
STAT_GASGIANTS 
STAT_STARS 
STAT_SHIPS 
STAT_BILLBOARD 
STAT_NUM_TEXTURE2D 
STAT_MEM_TEXTURE2D 
STAT_NUM_TEXTURECUBE 
STAT_MEM_TEXTURECUBE 
STAT_NUM_TEXTUREARRAY2D 
STAT_MEM_TEXTUREARRAY2D 
MAX_STAT 

Constructor & Destructor Documentation

◆ Stats()

Graphics::Stats::Stats ( )
Here is the call graph for this function:

◆ ~Stats()

Graphics::Stats::~Stats ( )
inline

Member Function Documentation

◆ AddToStatCount()

void Graphics::Stats::AddToStatCount ( const StatType  type,
const uint32_t  count 
) const
inline
Here is the call graph for this function:

◆ DecStatCount()

void Graphics::Stats::DecStatCount ( const StatType  type,
const uint32_t  count 
) const
inline
Here is the call graph for this function:

◆ FrameStatsPrevious()

const Stats::TFrameData & Graphics::Stats::FrameStatsPrevious ( ) const
Here is the call graph for this function:

◆ GetFullStats()

const FrameInfo & Graphics::Stats::GetFullStats ( ) const
inline
Here is the call graph for this function:

◆ NextFrame()

void Graphics::Stats::NextFrame ( )
Here is the call graph for this function:

◆ SetStatCount()

void Graphics::Stats::SetStatCount ( const StatType  type,
const uint32_t  count 
) const
inline
Here is the call graph for this function:

Member Data Documentation

◆ MAX_FRAMES_STORE

const Uint32 Graphics::Stats::MAX_FRAMES_STORE = 30U
static

The documentation for this class was generated from the following files: