PerformanceOverlay Class
Definition
Namespace: Brine2D.Performance
Renders a performance statistics overlay on screen. Shows FPS, frame time, draw calls, and other metrics. Renders in screen space \(UI layer\) so it doesn't move with the camera.
Inheritance System.Object → PerformanceOverlay
| Properties | |
|---|---|
| DisplayUpdateInterval | Gets or sets the display update interval in seconds. Default is 0.1 \(10 updates per second\). Lower values update more frequently but use more CPU for text rendering. |
| IsVisible | Gets or sets whether the overlay is visible. |
| Position | Gets or sets the overlay position on screen. |
| ShowDetailedStats | Gets or sets whether to show detailed statistics. |
| ShowSystemProfiling | Gets or sets whether to show system profiling details. |
| Methods | |
|---|---|
| Render\(IRenderer\) | Renders the performance overlay. Screen dimensions are obtained from the renderer. |
| RenderFrameTimeGraph\(IRenderer\) | Renders a frame time graph. Graph updates every frame for smooth animation. Screen dimensions are obtained from the renderer. |
| RenderSystemProfiling\(IRenderer\) | Renders system profiling data \(F4 toggle\). Updates are throttled to the same rate as the main overlay. Screen dimensions are obtained from the renderer. |
| UpdateDisplayedValues() | Updates the displayed values from the monitor. Called at a fixed interval \(not every frame\). |