IGraphicsTimer

Description

interface Tinman.Engine.Rendering.IGraphicsTimer

Derived from

IDisposable
IBeginEnd

Extended by

GraphicsTimer abstract

Represents a timer that can be used to measure the execution time on the GPU.

To perform profiling on the GPU, the following steps are necessary:

  1. Create a GPU timer object by calling IGraphicsContext.CreateTimer.

  2. Call IBeginEnd.Begin while rendering a frame, to mark the begin of the query.

  3. Call IBeginEnd.End while rendering a frame, to mark the end of the query.

  4. Call Result to poll the query result and process the returned value.

The above methods may only be called between paired IBeginEnd.Begin / IBeginEnd.End calls of IGraphicsContext.

Public / Methods

Result


[BeginEnd]
public method Result → ()

returns → float64

The timer query result value in milli-seconds or 0 if there are no results yet.

Returns the value of the timer query that has finished most recently.

The query that has finished most recently is not necessarily the one that has been issued by the last pair of IBeginEnd.Begin and IBeginEnd.End.