Nameless Engine
Loading...
Searching...
No Matches
ne::RenderStatistics Class Reference

#include <RenderStatistics.h>

Classes

struct  Counters
 
struct  FpsLimitInfo
 
struct  FramesPerSecondInfo
 
struct  FrameTemporaryStatistics
 
struct  TaskTimeInfo
 

Public Member Functions

 RenderStatistics (const RenderStatistics &)=delete
 
RenderStatisticsoperator= (const RenderStatistics &)=delete
 
size_t getFramesPerSecond () const
 
size_t getLastFrameDrawCallCount () const
 
size_t getLastFrameCulledMeshCount () const
 
size_t getLastFrameCulledLightCount () const
 
float getTimeSpentLastFrameWaitingForGpu () const
 
float getTimeSpentLastFrameOnFrustumCullingMeshes () const
 
float getTimeSpentLastFrameOnFrustumCullingLights () const
 

Private Member Functions

void saveAndResetTemporaryFrameStatistics ()
 

Private Attributes

FramesPerSecondInfo fpsInfo
 
FpsLimitInfo fpsLimitInfo
 
TaskTimeInfo taskTimeInfo
 
Counters counters
 
FrameTemporaryStatistics frameTemporaryStatistics
 

Friends

class Renderer
 

Detailed Description

Stores various statistics about rendering (FPS for example).

Member Function Documentation

◆ getFramesPerSecond()

size_t ne::RenderStatistics::getFramesPerSecond ( ) const

Returns the total number of frames that the renderer produced in the last second.

Returns
Zero if not calculated yet (wait at least 1 second), otherwise FPS count.

◆ getLastFrameCulledLightCount()

size_t ne::RenderStatistics::getLastFrameCulledLightCount ( ) const

Returns the total number of lights that were discarded from submitting to the rendering during the last frame.

Returns
Mesh count.

◆ getLastFrameCulledMeshCount()

size_t ne::RenderStatistics::getLastFrameCulledMeshCount ( ) const

Returns the total number of meshes that were discarded from submitting to the rendering during the last frame.

Returns
Mesh count.

◆ getLastFrameDrawCallCount()

size_t ne::RenderStatistics::getLastFrameDrawCallCount ( ) const

Returns the total number of draw calls made last frame.

Returns
Draw call count.

◆ getTimeSpentLastFrameOnFrustumCullingLights()

float ne::RenderStatistics::getTimeSpentLastFrameOnFrustumCullingLights ( ) const

Returns time in milliseconds that was spent last frame doing frustum culling for lights.

Returns
Time in milliseconds.

◆ getTimeSpentLastFrameOnFrustumCullingMeshes()

float ne::RenderStatistics::getTimeSpentLastFrameOnFrustumCullingMeshes ( ) const

Returns time in milliseconds that was spent last frame doing frustum culling for meshes.

Returns
Time in milliseconds.

◆ getTimeSpentLastFrameWaitingForGpu()

float ne::RenderStatistics::getTimeSpentLastFrameWaitingForGpu ( ) const

Returns time in milliseconds that was spent last frame waiting for GPU to catch up to the CPU.

Remarks
If returned value is constantly bigger than zero then this might mean that you are GPU bound, if constantly zero (0.0F) then this might mean that you are CPU bound.
Returns
Time in milliseconds.

◆ saveAndResetTemporaryFrameStatistics()

void ne::RenderStatistics::saveAndResetTemporaryFrameStatistics ( )
private

Saves all temporary frame statistics as resulting values in non-temporary structs and resets all temporary statistics (variables in this struct).

Member Data Documentation

◆ counters

Counters ne::RenderStatistics::counters
private

Counters for various tasks.

◆ fpsInfo

FramesPerSecondInfo ne::RenderStatistics::fpsInfo
private

Info related to measuring frame count per second.

◆ fpsLimitInfo

FpsLimitInfo ne::RenderStatistics::fpsLimitInfo
private

Info related to FPS limiting.

◆ frameTemporaryStatistics

FrameTemporaryStatistics ne::RenderStatistics::frameTemporaryStatistics
private

Temporary counters for a single frame.

◆ taskTimeInfo

TaskTimeInfo ne::RenderStatistics::taskTimeInfo
private

Info related to measuring time for specific tasks.


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