|
Flint Engine
Modular C++20 2D game engine powered by SDL3
|
Entry-point base class for a Flint application. More...
#include <flint/core/application.h>
Collaboration diagram for Flint::Application:Public Member Functions | |
| FLINT_API | Application (const FlintConfig &config, IAssetLoader *assetLoader=nullptr) |
| Construct and initialize a Flint application. | |
| FLINT_API | Application (const FlintConfig &config, IAssetLoader &assetLoader) |
| FLINT_API void | run () |
| IWindow & | getWindow () |
| returns A window reference. | |
| GPURenderer & | getRenderer () const |
| returns A reference to the GPU renderer. | |
| UISystem & | getUISystem () |
| Returns the UI system. | |
| UICanvas & | getUICanvas () |
| Returns the UI renderer. | |
| FLINT_API std::string | loadUIContent (const std::string &filePath) |
| StateManager & | getStateManager () |
| returns A reference to the state manager. | |
| Audio & | getAudioEngine () |
| returns A reference to the audio engine. | |
| IAssetLoader & | getAssetLoader () |
| returns A reference to the asset loader | |
| AssetManager & | getAssetManager () |
| const AssetManager & | getAssetManager () const |
| const FlintConfig & | getConfig () const |
| virtual FLINT_API void | close () |
Protected Member Functions | |
| virtual std::unique_ptr< State > | createInitialState ()=0 |
| Factory method that creates the game state pushed into the stack. | |
| virtual void | onInit () |
| Optional hook called after engine is fully initialized. | |
| virtual void | onUpdate (float deltaTime) |
| virtual void | onShutdown () |
| Optional hook called just before the engine shuts down. | |
Entry-point base class for a Flint application.
Definition at line 28 of file application.h.
| FLINT_API Flint::Application::Application | ( | const FlintConfig & | config, |
| IAssetLoader * | assetLoader = nullptr ) |
Construct and initialize a Flint application.
Create and initialize application systems (window GPU renderer, Audio engine, and input manager)
| config | Configurations |
| assetLoader | Asset loader used by the render and games states. |
|
inline |
Definition at line 41 of file application.h.
|
protectedpure virtual |
Factory method that creates the game state pushed into the stack.
Called once in during run() before the main loop begins.
|
inline |
returns A reference to the asset loader
Definition at line 81 of file application.h.
|
inline |
Definition at line 85 of file application.h.
|
inline |
Definition at line 89 of file application.h.
|
inline |
returns A reference to the audio engine.
Definition at line 76 of file application.h.
|
inline |
Definition at line 93 of file application.h.
|
inline |
returns A reference to the GPU renderer.
Definition at line 54 of file application.h.
|
inline |
returns A reference to the state manager.
Definition at line 71 of file application.h.
|
inline |
Returns the UI renderer.
Definition at line 64 of file application.h.
|
inline |
Returns the UI system.
Definition at line 59 of file application.h.
|
inline |
returns A window reference.
Definition at line 49 of file application.h.
|
inlineprotectedvirtual |
Optional hook called after engine is fully initialized.
Override to perform an additional one-time setup before the first frame.
Definition at line 114 of file application.h.
|
inlineprotectedvirtual |
Optional hook called just before the engine shuts down.
Override to release resources that depend on the engine still being alive.
Definition at line 126 of file application.h.
|
inlineprotectedvirtual |
Definition at line 117 of file application.h.