This class is mostly used to abstract stuff like the root node and obtaining deltaTime. It determines when the lifetime functions of every other node and component is called.
The engine class should be initialized in the main function after nodes are setup and have its update and render functions called in the main loop. In the end, the engine.exit() function should be called. Also, the engines constructor defines the app name which is used when reading/writing to the user folder. All Calamity Engine apps are stored under the Calamity Engine base folder and the app name is used as the organization folder. For more information read this SDL3 wiki page.
You also must append atleast 1 Window to the engine for anything to render to the screen.
while (!input.shouldQuit) {
}
static const Color BLACK
Definition definitions.hpp:59
int appendWindow(std::shared_ptr< Window > window)
Definition engine.cpp:129
void initialize()
Definition engine.cpp:61
void render(Graphics &graphics)
Definition engine.cpp:118
void update()
Definition engine.cpp:70
void exit()
Definition engine.cpp:102
Definition graphics.hpp:26
static void init(Graphics *graphics, Physics *physics, Engine *engine, Input *input, InputRegistry *inputRegistry, Audio *audio)
Definition services.cpp:13
static Graphics * graphics()
Definition services.cpp:23
Definition definitions.hpp:294