bootstrap.ixx File
Engine bootstrap: component registration and GameWorld/GameLoop factory. More...
Included Headers
#include <cassert>
#include <cstddef>
#include <helios-engine-config.h>
#include <memory>
#include <utility>
#include <helios.engine.runtime.enginestate>
#include <helios.engine.runtime.registry>
#include <helios.engine.runtime.timing>
#include <helios.engine.runtime.gameloop>
#include <helios.engine.runtime.world>
#include <helios.engine.platform>
#include <helios.engine.core.thread>
#include <helios.engine.state.types.StateTransitionContext>
#include <helios.engine.runtime.messaging.command>
#include <helios.engine.runtime.world.types.GameObjectHandle>
#include <helios.engine.core.registry>
#include <helios.engine.runtime.world.EntityMutationManager>
#include <helios.engine.scene.registry>
#include <helios.engine.spatial.registry>
#include <helios.engine.runtime.lifecycle>
#include <helios.engine.rendering.RenderManager>
#include <helios.engine.rendering.registry>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | bootstrap |
Classes Index
| struct | ComponentRegistrar<std::tuple< TEntityManagers... >> |
Description
Engine bootstrap: component registration and GameWorld/GameLoop factory.
File Listing
The file content with the documentation metadata removed is:
9#include <helios-engine-config.h>
40using namespace helios::engine::core::thread;
41using namespace helios::engine::state::types;
42using namespace helios::engine::runtime::enginestate::types;
43using namespace helios::engine::platform::environment;
44using namespace helios::engine::platform::window;
45using namespace helios::engine::runtime::world;
46using namespace helios::engine::runtime::world::types;
47using namespace helios::engine::runtime::gameloop;
48using namespace helios::engine::runtime::messaging::command;
50export namespace helios::engine::bootstrap {
52 template<typename... Tuple>
53 struct ComponentRegistrar;
55 template<typename... TEntityManagers>
56 struct ComponentRegistrar<std::tuple<TEntityManagers...>> {
57 static void registerComponents() {
88 inline void registerAllComponents() {
90 static bool done = false;
91 if (done) {
94 done = true;
152 inline std::pair<std::unique_ptr<GameWorld>, std::unique_ptr<GameLoop>> bootstrapGameWorld(
153 JobSystem& jobSystem,
154 const size_t capacity = ENTITY_MANAGER_DEFAULT_CAPACITY
156 auto gameWorld = std::make_unique<helios::engine::runtime::world::GameWorld>(jobSystem, capacity);
161 registerAllComponents();
164 gameWorld->registerManager<helios::engine::runtime::lifecycle::WorldLifecycleManager>();
166 gameWorld->registerManager<helios::engine::runtime::enginestate::EngineStateManager>(
169 gameWorld->registerManager<helios::engine::runtime::timing::TimerManager>();
170 gameWorld->registerManager<helios::engine::runtime::world::EntityMutationManager<GameObjectEntityManager>>(
171 gameWorld->entityManager<GameObjectHandle>(),
175 gameWorld->session().trackState<helios::engine::runtime::enginestate::types::EngineState>();
177 gameWorld->registerCommandBuffer<RenderCommandBuffer>();
178 gameWorld->registerCommandBuffer<PlatformCommandBuffer>();
179 gameWorld->registerCommandBuffer<EngineCommandBuffer>();
180 gameWorld->registerCommandBuffer<EntityMutationCommandBuffer<GameObjectEntityManager>>();
182 gameWorld->session().setStateFrom<EngineState>(
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.