Class PerfStats
Namespace: ValveResourceFormat.Renderer
Assembly: Renderer.dll
Collects per frame rendering statistics.
public class PerfStatsInheritance
Constructors
PerfStats()
Initializes a new owned by the current thread until a frame is marked.
public PerfStats()Properties
Capture
Gets or sets whether statistics are actively collected this frame.
public bool Capture { get; set; }Property Value
Timings
Gets the CPU and GPU timings for the same frame. Captured independently of .
public Timings Timings { get; }Property Value
Methods
DisplayStats(TextRenderer, Camera, Scene, Scene?, float, float, float)
Renders the collected statistics to screen using the provided text renderer.
public void DisplayStats(TextRenderer textRenderer, Camera camera, Scene scene, Scene? skyboxScene, float x = 0.02, float y = 0.05, float scale = 11)Parameters
textRenderer TextRenderer
Text renderer to use for display.
camera Camera
Camera for positioning text.
scene Scene
Main scene, used to compute map totals.
skyboxScene Scene?
Optional 3D skybox scene, included in map totals.
x float
X position (0-1 as fraction of screen width).
y float
Y position (0-1 as fraction of screen height).
scale float
Text scale.
Dispose()
Releases resources.
public void Dispose()MarkFrameBegin()
Resets per-frame counters, reads back the previous frame's results.
public void MarkFrameBegin()MarkFrameEnd()
Ends this frame's counters and timings.
public void MarkFrameEnd()
