Every Prisma Engine game is anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Excurs1ons/PrismaEngine/llms.txt
Use this file to discover all available pages before exploring further.
Application. You subclass Prisma::Application, implement the required lifecycle hooks, and expose a CreateApplication() factory function that the engine entry point calls to construct your game. The engine takes ownership of the returned pointer and drives all callbacks from the main loop.
ApplicationSpecification
Fill inApplicationSpecification before constructing your subclass to configure the initial window and rendering parameters.
Application display name. Appears in the window title bar. Defaults to
"Prisma App".Relative path to the scene file loaded at startup. Leave empty to start with no scene. Defaults to
"".Initial window width in pixels. Defaults to
1280.Initial window height in pixels. Defaults to
720.Start in fullscreen mode. Defaults to
false.Allow the window to be resized by the user. Defaults to
true.Swap-chain presentation mode. Defaults to
PresentMode::VSync.Frame-rate cap.
0 means uncapped. Defaults to 0.Application class
Required override
OnInitialize
0 to signal success. Any non-zero return aborts startup and triggers shutdown.
Optional lifecycle overrides
OnShutdown
OnUpdate
ts carries the elapsed time since the last frame. Drive game logic, physics queries, and ECS world updates from here.
Time elapsed since the previous frame. Use
ts.GetSeconds() or ts.GetMilliseconds() to read the delta as a float.OnRender
OnUpdate(), dedicated to submitting draw commands. Keep rendering code here and update-logic code in OnUpdate() to maintain a clean separation.
OnImGuiRender
OnRender() when the ImGui debug UI is active (editor and debug builds). Issue ImGui widgets here.
OnEvent
OnUpdate(). Use EventDispatcher to handle specific event types.
The platform event. Cast to a concrete type with
EventDispatcher or event_cast<T>.ShouldCloseOnWindowClose
false to keep the engine running after the window is closed — useful for headless servers or custom shutdown flows. Defaults to true.
State control
Close() signals the engine to exit the main loop after the current frame completes. IsRunning() reflects whether Close() has been called yet.
Layer system
Applications support aLayerStack for organizing subsystems or editor panels:
OnUpdate, OnRender, and OnEvent calls in stack order. Overlays are pushed on top and processed last.
ECSApplication
For ECS-driven games, prefer subclassingECSApplication instead of Application directly. It embeds a Core::ECS::World and overrides OnUpdate() to drive all registered systems automatically.
CreateApplication factory
Every executable must define this free function. The engine calls it once during startup:The engine wraps the raw pointer in a
std::unique_ptr<Application> immediately after CreateApplication() returns. Do not delete the returned object yourself.