class RenderStats

Tracks various render system statistics.

Public

Methods

IncNumDrawCalls

void IncNumDrawCalls()

Increments draw call counter indicating how many times were render system API Draw methods called.

IncNumComputeCalls

void IncNumComputeCalls()

Increments compute call counter indicating how many times were compute shaders dispatched.

IncNumRenderTargetChanges

void IncNumRenderTargetChanges()

Increments render target change counter indicating how many times did the active render target change.

IncNumPresents

void IncNumPresents()

Increments render target present counter indicating how many times did the buffer swap happen.

IncNumClears

void IncNumClears()

Increments render target clear counter indicating how many times did the target the cleared, entirely or partially.

AddNumVertices

void AddNumVertices(u32 count)

Increments vertex draw counter indicating how many vertices were sent to the pipeline.

AddNumPrimitives

void AddNumPrimitives(u32 count)

Increments primitive draw counter indicating how many primitives were sent to the pipeline.

IncNumPipelineStateChanges

void IncNumPipelineStateChanges()

Increments pipeline state change counter indicating how many times was a pipeline state bound.

IncNumGpuParamBinds

void IncNumGpuParamBinds()

Increments GPU parameter change counter indicating how many times were GPU parameters bound to the pipeline.

IncNumVertexBufferBinds

void IncNumVertexBufferBinds()

Increments vertex buffer change counter indicating how many times was a vertex buffer bound to the pipeline.

IncNumIndexBufferBinds

void IncNumIndexBufferBinds()

Increments index buffer change counter indicating how many times was a index buffer bound to the pipeline.

IncResCreated

void IncResCreated(u32 category)

Increments created GPU resource counter.

category
Category of the resource.

IncResDestroyed

void IncResDestroyed(u32 category)

Increments destroyed GPU resource counter.

category
Category of the resource.

IncResRead

void IncResRead(u32 category)

Increments GPU resource read counter.

category
Category of the resource.

IncResWrite

void IncResWrite(u32 category)

Increments GPU resource write counter.

category
Category of the resource.

GetData

RenderStatsData &GetData()

Returns an object containing various rendering statistics.

staticInstance

static T &Instance()

Returns a reference to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticInstancePtr

static T *InstancePtr()

Returns a pointer to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticShutDown

static void ShutDown()

Shuts down this module and frees any resources it is using.

staticIsStarted

static bool IsStarted()

Query if the module has been started.

Protected

Methods

~Module<T>

virtual ~Module<T>() = default

OnStartUp

virtual void OnStartUp()

Override if you want your module to be notified once it has been constructed and started.

OnShutDown

virtual void OnShutDown()

Override if you want your module to be notified just before it is deleted.

staticInstanceInternal

static T *&InstanceInternal()

Returns a singleton instance of this module.

staticIsDestroyed

static bool &IsDestroyed()

Checks has the Module been shut down.

staticIsStartedUp

static bool &IsStartedUp()

Checks has the Module been started up.

Private

Fields

mData