![]() |
Rendering Engine 0.2.9
Modular Graphics Rendering Engine | v0.2.9
|
Displays real-time frame statistics as a 2D overlay. More...
#include <stats_overlay.hpp>
Inherits rendering_engine::Actor2D.
Public Member Functions | |
| StatsOverlay (Scene &scene) | |
| Constructs a StatsOverlay actor. More... | |
| void | Initialize () override |
| Creates and positions overlay visual elements. More... | |
| void | Update (float deltaTime) override |
| Updates displayed statistics each frame. More... | |
Public Member Functions inherited from rendering_engine::Actor2D | |
| Actor2D (Scene &scene) | |
| Constructs a 2D actor associated with a Scene. More... | |
| virtual | ~Actor2D () |
| virtual void | Initialize () |
| Initializes the actor after creation. More... | |
| void | SetPosition (const glm::vec2 &position) |
| Sets the actor's position in world space. More... | |
| void | SetRotation (float angleDegrees) |
| Sets the actor's rotation in degrees. More... | |
| void | SetScale (const glm::vec2 &scale) |
| Sets the actor's scale along each axis. More... | |
| const glm::vec2 & | GetPosition () const |
| Gets the actor 2d position. More... | |
| float | GetRotation () const |
| Gets the actor 2d rotation angle (degrees). More... | |
| const glm::vec2 & | GetScale () const |
| Gets the actor 2d scale. More... | |
| SceneComponent2D & | GetTransform () |
| Access to the underlying SceneComponent2D (transform). More... | |
| const SceneComponent2D & | GetTransform () const |
| virtual void | Update (float deltaTime) |
| Updates actor logic and root transform state. More... | |
| RenderResourceContext | GetRenderContext () const |
| Returns the render resource context associated with this actor. More... | |
| void | Destroy () |
| Requests deferred destruction of this 2D actor. More... | |
| bool | IsPendingDestroy () const |
| Indicates whether this actor is scheduled for destruction. More... | |
| Actor2D (const Actor2D &)=delete | |
| Actor2D & | operator= (const Actor2D &)=delete |
Additional Inherited Members | |
Protected Member Functions inherited from rendering_engine::Actor2D | |
| virtual void | Shutdown () |
| Performs internal cleanup before destruction. More... | |
| template<typename T , typename V > | |
| T * | CreateSubobject (V arg) |
| Creates and attaches a 2D drawable subobject to this actor. More... | |
| Scene & | GetScene () |
| Returns the owning Scene. More... | |
| template<> | |
| Rectangle2D * | CreateSubobject (Rectangle2D::Properties prop) |
| template<> | |
| TextBlock2D * | CreateSubobject (TextBlock2D::Properties prop) |
Protected Attributes inherited from rendering_engine::Actor2D | |
| SceneComponent2D | mRootComponent |
| bool | bUpdateOnTick |
| bool | bPendingDestroy = false |
Displays real-time frame statistics as a 2D overlay.
StatsOverlay renders a simple performance panel containing:
The overlay is drawn in screen space using Rectangle2D and TextBlock2D subobjects. Values are updated every frame using FrameMetrics obtained from the active application.
Intended for debugging and performance diagnostics.
Definition at line 31 of file stats_overlay.hpp.
| rendering_engine::StatsOverlay::StatsOverlay | ( | Scene & | scene | ) |
Constructs a StatsOverlay actor.
Reads configuration options and prepares internal state.
| scene | Reference to the owning scene. |
Definition at line 16 of file stats_overlay.cpp.
|
overridevirtual |
Creates and positions overlay visual elements.
Spawns background rectangle and label/value text blocks, attaches them to the root component, and arranges them in a two-column layout.
Reimplemented from rendering_engine::Actor2D.
Definition at line 31 of file stats_overlay.cpp.
|
overridevirtual |
Updates displayed statistics each frame.
Retrieves FrameMetrics from the active application and updates value text blocks accordingly.
| deltaTime | Time elapsed since previous frame (ms). |
Reimplemented from rendering_engine::Actor2D.
Definition at line 98 of file stats_overlay.cpp.