diff options
| author | Aaditya Dhruv <[email protected]> | 2026-01-25 18:06:13 -0600 |
|---|---|---|
| committer | Aaditya Dhruv <[email protected]> | 2026-01-25 18:06:13 -0600 |
| commit | 955ffb0d4a0235532fdb9b808745bcf571735122 (patch) | |
| tree | 7b6dce22f1af65411ba27cfae88a4e4d9927d862 /src/engine.h | |
| parent | 118980e02e59ff31871df59dce257075394f3533 (diff) | |
rotating cube
Diffstat (limited to 'src/engine.h')
| -rw-r--r-- | src/engine.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/engine.h b/src/engine.h new file mode 100644 index 0000000..7fde16f --- /dev/null +++ b/src/engine.h @@ -0,0 +1,26 @@ +#pragma once +#include "window.h" +#include "shader.h" +#include "junk/vector.h" +struct engine { + struct window* window; + struct shader* shader; + struct vector* objects; + int game_loop; +}; + +/** + * Initalize the Engine, a struct that oversees the rest of the components in the game + * @param @out engine The engine struct to store data in + * @return 0 on success + */ +int engine_init(struct engine* engine); + + +/** + * Take all objects in the engine, apply the shader pipeline and draw on the window + * Event handling is also processed here, though should maybe moved to a separate thread + * + * @param engine The target engine + */ +void engine_draw(struct engine* engine); |
