MCPcopy Create free account
hub / github.com/KTStephano/StratusGFX / EngineModuleInit

Class EngineModuleInit

Source/Engine/StratusEngine.cpp:126–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124 }
125
126 struct EngineModuleInit {
127 template<typename E>
128 static void InitializeEngineModule(E * instance, const bool log) {
129 if (log) {
130 STRATUS_LOG << "Initializing " << instance->Name() << std::endl;
131 }
132
133 if (!instance->Initialize()) {
134 std::cerr << instance->Name() << " failed to load" << std::endl;
135 exit(-1);
136 }
137 }
138
139 template<typename E>
140 static void InitializeEngineModule(E *& ptr, E * instance, const bool log) {
141 InitializeEngineModule<E>(instance, log);
142 ptr = instance;
143 }
144 };
145
146 void Engine::Initialize() {
147 // We need to initialize everything on renderer thread

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected