Base interface implemented by game-specific engine modules.
More...
#include <GameModule.h>
|
| | GameModule ()=default |
| | Creates an empty game module.
|
| virtual | ~GameModule ()=default |
| | Destroys the game module.
|
| virtual void | init (GLFWwindow *window) |
| | Initializes module state with the application window.
|
| virtual void | initUI (GLFWwindow *window) |
| | Initializes module UI state with the application window.
|
| virtual void | startup () |
| | Runs module startup logic after initialization.
|
| virtual void | preTick () |
| | Runs logic before the game tick.
|
| virtual void | tick (double deltaTime) |
| | Runs per-frame game logic.
|
| virtual void | postTick () |
| | Runs logic after the game tick.
|
| virtual void | preDraw () |
| | Runs logic before drawing.
|
| virtual void | onDraw (VkCommandBuffer commandBuffer) |
| | Records module draw commands.
|
| virtual void | postDraw () |
| | Runs logic after drawing.
|
| virtual void | shutdown () |
| | Shuts down module-owned resources.
|
| virtual void | registerCollisionProfiles (Physics::CollisionProfileRegistry ®istry) |
| | Registers module-specific collision profiles.
|
| virtual std::vector< std::filesystem::path > | getInitialSceneContents () const |
| | Returns asset paths to load into the initial scene.
|
| virtual void | collectSceneBrowserEntries (std::vector< SceneBrowserEntry > &entries) const |
| | Appends scenes exposed to the scene browser.
|
| GLFWwindow * | getWindow () const |
| | Returns the application window assigned during init().
|
| virtual Entities::Scene * | loadInitialScene () |
| | Creates or returns the initial scene for this module.
|
Base interface implemented by game-specific engine modules.
Definition at line 35 of file GameModule.h.
◆ GameModule()
| Engine::GameModule::GameModule |
( |
| ) |
|
|
default |
Creates an empty game module.
◆ ~GameModule()
| virtual Engine::GameModule::~GameModule |
( |
| ) |
|
|
virtualdefault |
Destroys the game module.
◆ collectSceneBrowserEntries()
| virtual void Engine::GameModule::collectSceneBrowserEntries |
( |
std::vector< SceneBrowserEntry > & | entries | ) |
const |
|
virtual |
Appends scenes exposed to the scene browser.
- Parameters
-
| entries | Scene browser entry list to extend. |
◆ getInitialSceneContents()
| virtual std::vector< std::filesystem::path > Engine::GameModule::getInitialSceneContents |
( |
| ) |
const |
|
nodiscardvirtual |
Returns asset paths to load into the initial scene.
◆ getWindow()
| GLFWwindow * Engine::GameModule::getWindow |
( |
| ) |
const |
Returns the application window assigned during init().
◆ init()
| virtual void Engine::GameModule::init |
( |
GLFWwindow * | window | ) |
|
|
virtual |
Initializes module state with the application window.
- Parameters
-
| window | GLFW window owned by the application. |
References window.
◆ initUI()
| virtual void Engine::GameModule::initUI |
( |
GLFWwindow * | window | ) |
|
|
virtual |
Initializes module UI state with the application window.
- Parameters
-
| window | GLFW window owned by the application. |
References window.
◆ loadInitialScene()
Creates or returns the initial scene for this module.
◆ onDraw()
| virtual void Engine::GameModule::onDraw |
( |
VkCommandBuffer | commandBuffer | ) |
|
|
virtual |
Records module draw commands.
- Parameters
-
| commandBuffer | Vulkan command buffer for the current frame. |
◆ postDraw()
| virtual void Engine::GameModule::postDraw |
( |
| ) |
|
|
virtual |
Runs logic after drawing.
◆ postTick()
| virtual void Engine::GameModule::postTick |
( |
| ) |
|
|
virtual |
Runs logic after the game tick.
◆ preDraw()
| virtual void Engine::GameModule::preDraw |
( |
| ) |
|
|
virtual |
Runs logic before drawing.
◆ preTick()
| virtual void Engine::GameModule::preTick |
( |
| ) |
|
|
virtual |
Runs logic before the game tick.
◆ registerCollisionProfiles()
Registers module-specific collision profiles.
- Parameters
-
| registry | Collision profile registry to extend. |
◆ shutdown()
| virtual void Engine::GameModule::shutdown |
( |
| ) |
|
|
virtual |
Shuts down module-owned resources.
◆ startup()
| virtual void Engine::GameModule::startup |
( |
| ) |
|
|
virtual |
Runs module startup logic after initialization.
◆ tick()
| virtual void Engine::GameModule::tick |
( |
double | deltaTime | ) |
|
|
virtual |
Runs per-frame game logic.
- Parameters
-
| deltaTime | Time elapsed since the previous frame. |
◆ window
| GLFWwindow* Engine::GameModule::window |
|
private |
The documentation for this class was generated from the following file:
- /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Game/GameModule.h