From 1e3fcf5b38d67fb54102786be74af42be5c6792f Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Tue, 3 Jan 2023 08:49:54 -0800 Subject: Initial commit. --- gltfview/src/game.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 gltfview/src/game.h (limited to 'gltfview/src/game.h') diff --git a/gltfview/src/game.h b/gltfview/src/game.h new file mode 100644 index 0000000..92c0885 --- /dev/null +++ b/gltfview/src/game.h @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include +#include +#include + +#include + +/// The delta time the game should be updated with. +static const double game_dt = 1.0 / 60.0; + +/// Game state. +typedef struct { + Gfx* gfx; + RenderBackend* render_backend; + Renderer* renderer; + Scene* scene; + SceneCamera* camera; + double elapsed; +} Game; + +bool game_new(Game*, int argc, const char** argv); + +void game_end(Game*); + +void game_update(Game*, double t, double dt); + +void game_render(const Game*); + +void game_set_viewport(Game*, int width, int height); -- cgit v1.2.3