Engine context: owns core state and runs the main loop.
More...
#include <engine.h>
|
| void | setFPSLog (bool enabled=true) |
| | Log "FPS: N (M ms)" to the console once a second.
|
|
void | run () |
| | Run the main loop, blocking until the window closes or the process is interrupted.
|
| template<typename T, typename... Args> |
| T & | addSystem (SystemStage stage, Args &&... args) |
| | Create and register a system at the given execution stage.
|
| InputMap & | getInput () |
| | The action map gameplay reads input through.
|
| HostChrome & | getChrome () |
| | What an authoring host says about the frame it draws over.
|
| RenderSettings & | getRenderSettings () |
| | The quality settings this session draws at.
|
| void | setProjectRenderSettings (const RenderSettings &project) |
| | Start the session from project, the project.json render block: the session's settings and the copy gameplay builds a quality tier over (withPreset).
|
|
const RenderSettings & | getProjectRenderSettings () const |
| | The project.json render block the session started from (setProjectRenderSettings).
|
| NetSession & | getNet () |
| | The session this end is playing in, offline until told otherwise.
|
Engine context: owns core state and runs the main loop.
Owns the services handed to systems on FrameContext, and the per-stage system pipeline. Stack-constructible, so tests and headless tooling can make their own.
◆ setFPSLog()
| void Vkm::Engine::Engine::setFPSLog |
( |
bool | enabled = true | ) |
|
|
inline |
Log "FPS: N (M ms)" to the console once a second.
- Parameters
-
◆ addSystem()
template<typename T, typename... Args>
| T & Vkm::Engine::Engine::addSystem |
( |
SystemStage | stage, |
|
|
Args &&... | args ) |
|
inline |
Create and register a system at the given execution stage.
Stages run in SystemStage order; within one, in registration order.
- Template Parameters
-
| T | System subclass to create. |
| Args | Constructor argument types. |
- Parameters
-
| stage | Frame stage it runs in. |
| args | Forwarded to T's constructor. |
- Returns
- The new system, owned by Engine.
◆ getInput()
| InputMap & Vkm::Engine::Engine::getInput |
( |
| ) |
|
|
inline |
The action map gameplay reads input through.
For the host; systems and behaviors use the frame context.
◆ getChrome()
What an authoring host says about the frame it draws over.
For the host that writes it; systems read it off the frame context.
◆ getRenderSettings()
The quality settings this session draws at.
The project.json render block, after a player's changes; writable while the game runs.
◆ setProjectRenderSettings()
| void Vkm::Engine::Engine::setProjectRenderSettings |
( |
const RenderSettings & | project | ) |
|
|
inline |
Start the session from project, the project.json render block: the session's settings and the copy gameplay builds a quality tier over (withPreset).
- Parameters
-
| project | The block, as loadProject read it. |
◆ getNet()
The documentation for this class was generated from the following file: