|
Monad Engine da02fba2
> Undercity Codex_
|
Interface that every runnable game or lab must implement. More...
#include <Application.h>
Public Member Functions | |
| virtual bool | Init ()=0 |
| Called once by Engine::Init() after the GL context is ready. | |
| virtual void | RegisterTypes ()=0 |
| virtual void | Update (float deltaTime)=0 |
| Called every frame by Engine::Run() with the elapsed time. | |
| virtual void | Destroy ()=0 |
| Called by Engine::Destroy() before the GL context is torn down. Release GPU resources (meshes, textures, shaders) here. | |
| void | SetNeedsToBeClosed (bool value) |
| Request the engine to stop after the current frame. | |
| bool | NeedsToBeClosed () const |
| Returns true when the application has requested shutdown. Engine::Run() checks this each frame to know when to exit. | |
Interface that every runnable game or lab must implement.
The Engine singleton owns the Application instance (via std::unique_ptr) and drives its lifecycle through the three virtual methods below.
Definition at line 35 of file Application.h.
|
pure virtual |
Called by Engine::Destroy() before the GL context is torn down. Release GPU resources (meshes, textures, shaders) here.
|
pure virtual |
Called once by Engine::Init() after the GL context is ready.
| bool mnd::Application::NeedsToBeClosed | ( | ) | const |
Returns true when the application has requested shutdown. Engine::Run() checks this each frame to know when to exit.
Definition at line 13 of file Application.cpp.
|
pure virtual |
Definition at line 6 of file Application.cpp.
| void mnd::Application::SetNeedsToBeClosed | ( | bool | value | ) |
Request the engine to stop after the current frame.
| value | true to signal shutdown, false to keep running. |
Definition at line 8 of file Application.cpp.
|
pure virtual |
Called every frame by Engine::Run() with the elapsed time.
| deltaTime | Seconds since the previous frame. Use this to make movement and animations frame-rate independent. |