Click or drag to resize
AB4D logo

RenderingStatistics Class

RenderingStatistics collects various rendering statistics for one rendered frame.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXRenderingStatistics

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.1.9105.2048 (1.0.0.0)
Syntax
C#
public class RenderingStatistics

The RenderingStatistics type exposes the following members.

Constructors
 NameDescription
Public methodRenderingStatistics Constructor
Top
Properties
 NameDescription
Public propertyCachedCommandListsCount Gets or sets a number of cached DirectX CammandLists that were created in one of the previous frame and executed in the last rendered frame.
Public propertyCachedRenderedObjectsCount Gets or sets the total number of rendered objects (RenderablePrimitives) that were rendered in the cached DirectX CommandLists.
Public propertyCompleteRenderTimeMs Gets number of milliseconds that were needed to complete the rendering (resolve anti-aliasing, resolve stereoscopic images, calling Present on SwapChain (when using DirectXOverlay) or waiting for the graphics card to finish rendering the frame (when using DirectXImage)).
Public propertyConstantBufferChangesCount Gets number of times constant buffer was changed in this frame.
Public propertyCreatedCommandListsCount Gets or sets a number of DirectX CommandList that were created in the last rendered frame.
Public propertyDrawCallsCount Gets number of draw calls in this frame. This value can be incremented by calling ReportDrawCall(Int32) method.
Public propertyDrawnIndicesCount Gets number of drawn triangle indices in this frame. This value can be incremented by calling ReportDrawCall(Int32) method.
Public propertyDrawRenderTimeMs Gets number of milliseconds that were needed to draw all objects for this frames (calling Draw methods and any needed state change methods).
Public propertyElapsedTimeInMs When called during frame rendering (between StartNewFrame and EndFrame calls) the elapsed time in milliseconds from the StartNewFrame call is returned. When called after EndFrame method is called, the TotalRenderTimeMs is returned.
Public propertyFrameNumber Gets the frame number for this RenderingStatistics.
Public propertyHitTestingTimeMs Gets number of milliseconds that were used for hit testing. Note: this time is not automatically reset to zero when new frame is started (when calling StartNewFrame(Int32) or ResetTimerValues). To show correct results, user needs to manually reset the time when the value is shown (this is done in the DiagnosticsWindow).
Public propertyIndexBuffersChangesCount Gets number of times index buffer was changed in this frame.
Public propertyMeshBytesUploaded Gets the total uploaded bytes that were uploaded from CPU to GPU memory to update meshes (vertex and index buffers).
Public propertyMeshUpdatesCount Gets the number of mesh buffers (vertex and index buffers) that were updated during Update phase.
Public propertyOther Gets a Dictionary with string as key and object as value that can be used to store custom rendering statistics. This dictionary is cleared on each start of frame.
Public propertyPostProcessingRenderTimeMs Gets number of milliseconds that were needed to render all post processing effects.
Public propertyPrepareRenderTimeMs Gets number of milliseconds that were needed to prepare the frame to be rendered (clear the buffers, initialize render targets and states, sort rendering queues by material or camera distance).
Public propertyRenderedObjectsCountPerThread Gets or sets an array that shows how many objects were rendered by a specific thread (index = 0 means the main thread; other indexes means background threads). This array is set only when multi-threading is used.
Public propertyRenderingQueuesRecreateCount Gets the number of times RenderingQueues were recreated.
Public propertyRenderShadowsMs Gets number of milliseconds that were needed to draw the shadow map and process it (for example apply blur for VarianceShadowMapping).
Public propertyRenderTimePerThread Gets or sets an array that shows render times used on each thread (index = 0 means the main thread; other indexes means background threads). This array is set only when multi-threading is used.
Public propertyShaderChangesCount Gets number of times shader was changed in this frame.
Public propertyStateChangesCount Gets number of state changes in this frame.
Public propertyTotalRenderTimeMs Gets number of milliseconds that were needed for this frame to render.
Public propertyUpdateTimeMs Gets number of milliseconds that were needed to update all SceneNodes.
Public propertyUsedBackgroundThreadsCount Gets the number of background threads that were used to render the frame. Zero means that all the objects were rendered on the main thread.
Public propertyVertexBuffersChangesCount Gets number of times vertex buffer was changed in this frame.
Top
Methods
 NameDescription
Public methodClone Returns a new RenderingStatistics with the same values as this RenderingStatistics.
Public methodCopy Copies the values from this RenderingStatistics to targetRenderingStatistics.
Public methodEndFrame EndFrame stops the timer.
Public methodReportDrawCall Increased the DrawCallsCount by one and DrawnIndicesCount by drawnIndicesCount. This method is thread safe and can be called from any thread.
Public methodReportDrawCalls Increased the DrawCallsCount by drawCallsCount and DrawnIndicesCount by drawnIndicesCount. This method is thread safe and can be called from any thread.
Public methodReportStateChanges Adds state changes statistics from the contextStatesManager. This method is automatically called from EndFrame(RenderingContext) for the main ContextStatesManager but needs to be called from the ContextStatesManager used in background threads. This method needs to be called from the main thread.
Public methodResetTimerValues Sets all timer values to 0
Public methodStartNewFrame StartNewFrame resets all the values in RenderingStatistics and start timer for new frame.
Top
See Also