RendererModule is the built-in rendering component in MiniECS. In its current form it serves as a lifecycle hook that demonstrates how a Module participates in the scene’s update loop — whenDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/raoulkdev/MiniECS/llms.txt
Use this file to discover all available pages before exploring further.
start() is called it prints a single line to stdout confirming that rendering has started. It is intentionally minimal, giving you a clean foundation to build real rendering logic on top of.
Class Definition
RendererModule inherits fromModule and overrides only start(). Like all built-in modules, it forwards construction to the base class via using Module::Module.
The start() Override
When start() is called, it writes a single confirmation line to stdout:
Attaching RendererModule to a Unit
PassMiniECS::ModuleType::Renderer to addModule on any Unit pointer. The module is constructed and owned by the Unit for the lifetime of the scene.
Retrieving RendererModule
UsegetModule<MiniECS::RendererModule>() to obtain a typed pointer to the attached RendererModule. Always check for nullptr before use — the module may not be attached.
Expected Output
When the scene is played andstart() is called, RendererModule produces the following line:
Extending RendererModule
RendererModule is intentionally minimal. It exists as a starting point for your own rendering logic rather than a fully featured renderer. Override
start() in a subclass to add draw calls or API integration, or extend the ModuleType enum and create a new Module class for richer, purpose-built functionality.