Skip to main content

Pass.ixx File

Abstract base class for game loop passes. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine
namespaceruntime
namespacegameloop

Classes Index

classPass

Abstract base class for game loop passes. More...

Description

Abstract base class for game loop passes.

File Listing

The file content with the documentation metadata removed is:

1
5module;
6
7#include <type_traits>
8#include <utility>
9#include <memory>
10#include <cassert>
11
12export module helios.engine.runtime.gameloop:Pass;
13
14import :CommitPoint;
15
16import helios.engine.runtime.world.GameWorld;
17import helios.engine.runtime.world.SystemRegistry;
18import helios.engine.runtime.world.System;
19import helios.engine.runtime.world.concepts;
20
21
22import helios.engine.runtime.world.UpdateContext;
23
24import helios.engine.runtime.enginestate.types;
25
28
29 class Phase;
30
48 class Pass {
49
50 protected:
55
63
64
65 public:
66 virtual ~Pass() = default;
67
74 explicit Pass(GameWorld& gameWorld) : gameWorld_(gameWorld) {};
75
82
88 virtual void init(helios::engine::runtime::world::GameWorld& gameWorld) = 0;
89
98
105
113 virtual bool shouldRun(helios::engine::runtime::world::UpdateContext& updateContext) const noexcept = 0;
114
130 requires helios::engine::runtime::world::concepts::IsSystemLike<T>
132
133 T concreteSystem(std::forward<Args>(args)...);
134
135 void* bufferPtr = nullptr;
136 if constexpr (requires { typename T::CommandBuffer_type; }) {
137 using TCommandBuffer = typename T::CommandBuffer_type;
139 assert(bufferPtr && "Command buffer not found for system's CommandBuffer_type");
140 }
141
142 systemRegistry_.template add<T>(
144 );
145
146 return *this;
147 }
148 };
149
150}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.