![]() |
Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
Defines lifecycle hooks for extending engine startup, simulation, rendering, and shutdown behavior. More...
Public Member Functions | |
| void | OnInitialize (Engine engine) |
| Called when the engine is initializing. | |
| void | OnPreCycle (Engine engine, double deltaSeconds) |
| Called before each simulation cycle. | |
| void | OnPreFrameRender (Engine engine, double deltaSeconds) |
| Called before a frame is rendered. | |
| void | OnPostFrameRender (Engine engine, double deltaSeconds) |
| Called after a frame has been rendered. | |
| void | OnPostCycle (Engine engine, double deltaSeconds) |
| Called after each simulation cycle completes. | |
| void | OnPostRenderCanvas (Engine engine, RenderSurfaceHostBase host, SKCanvas canvas) |
| Called after all scene content for a surface has been drawn to the backbuffer canvas, but before the frame is finalised and presented to the display adapter. | |
| void | OnShutdown (Engine engine) |
| Called when the engine is shutting down. | |
Properties | |
| string | Name [get] |
| Gets the display name of the plugin. | |
| string | Version [get] |
| Gets the plugin version string. | |
Defines lifecycle hooks for extending engine startup, simulation, rendering, and shutdown behavior.
Implementations can register with EnginePluginRegistry to observe engine events and run custom logic before or after key phases of engine execution.
Cycle hooks correspond to simulation updates, while frame-render hooks correspond to presentation frames. In timer-driven mode, a single external Engine.Tick may execute zero or more simulation cycles but no more than one rendered frame.
Definition at line 20 of file IEnginePlugin.cs.
| void Gondwana.Extensibility.IEnginePlugin.OnInitialize | ( | Engine | engine | ) |
Called when the engine is initializing.
| engine | The engine being initialized. |
| void Gondwana.Extensibility.IEnginePlugin.OnPostCycle | ( | Engine | engine, |
| double | deltaSeconds ) |
Called after each simulation cycle completes.
| engine | The engine that completed the simulation cycle. |
| deltaSeconds | The simulation delta for this cycle, in seconds. In timer-driven mode this is the fixed-step duration; in the normal desktop loop it is the elapsed wall-clock time since the previous cycle. |
| void Gondwana.Extensibility.IEnginePlugin.OnPostFrameRender | ( | Engine | engine, |
| double | deltaSeconds ) |
Called after a frame has been rendered.
| engine | The engine that rendered the frame. |
| deltaSeconds | The elapsed wall-clock time since the previous frame render, in seconds. |
| void Gondwana.Extensibility.IEnginePlugin.OnPostRenderCanvas | ( | Engine | engine, |
| RenderSurfaceHostBase | host, | ||
| SKCanvas | canvas ) |
Called after all scene content for a surface has been drawn to the backbuffer canvas, but before the frame is finalised and presented to the display adapter.
| engine | The engine that rendered the frame. |
| host | The render surface host whose backbuffer canvas has just been fully populated. Cast to RenderSurfaceHost<TBackbuffer> if you need access to typed backbuffer properties. |
| canvas | The SKCanvas for the backbuffer, ready to receive post-scene drawing (overlay effects, color grading, debug annotations, etc.). The canvas matrix is reset to identity and the clip covers the full surface. Callers must save and restore canvas state around any operations that change the matrix or clip region. |
This hook fires on the thread that owns the canvas:
This hook is not called when a frame is skipped (scene not dirty) or when the surface has no configured views.
Definition at line 110 of file IEnginePlugin.cs.
| void Gondwana.Extensibility.IEnginePlugin.OnPreCycle | ( | Engine | engine, |
| double | deltaSeconds ) |
Called before each simulation cycle.
| engine | The engine running the simulation cycle. |
| deltaSeconds | The simulation delta for this cycle, in seconds. In timer-driven mode this is the fixed-step duration; in the normal desktop loop it is the elapsed wall-clock time since the previous cycle. |
| void Gondwana.Extensibility.IEnginePlugin.OnPreFrameRender | ( | Engine | engine, |
| double | deltaSeconds ) |
Called before a frame is rendered.
| engine | The engine preparing to render. |
| deltaSeconds | The elapsed wall-clock time since the previous frame render, in seconds. |
| void Gondwana.Extensibility.IEnginePlugin.OnShutdown | ( | Engine | engine | ) |
Called when the engine is shutting down.
| engine | The engine being shut down. |
|
get |
Gets the display name of the plugin.
Definition at line 25 of file IEnginePlugin.cs.
|
get |
Gets the plugin version string.
Definition at line 30 of file IEnginePlugin.cs.