From 47d6a4d1c2973664dc79edd0043fe63dd1e369c6 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Thu, 5 Jan 2023 09:10:42 -0800 Subject: Add ability to set shader compiler defines. --- gltfview/src/main.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'gltfview/src') diff --git a/gltfview/src/main.c b/gltfview/src/main.c index f7c372c..f4863b4 100644 --- a/gltfview/src/main.c +++ b/gltfview/src/main.c @@ -12,7 +12,7 @@ static bool init(const GfxAppDesc* desc, void** app_state) { return false; } if (!game_new(game, desc->argc, desc->argv)) { - LOGE("Failed to initialize game\n"); + LOGE("Failed to initialize game"); return false; } *app_state = game; @@ -44,22 +44,24 @@ static void resize(void* app_state, int width, int height) { } int main(int argc, const char** argv) { - const int initial_width = 1350; + const int initial_width = 1350; const int initial_height = 900; - const int max_fps = 60; + const int max_fps = 60; - gfx_app_run(&(GfxAppDesc){.argc = argc, - .argv = argv, - .width = initial_width, - .height = initial_height, - .max_fps = max_fps, - .update_delta_time = - max_fps > 0 ? 1.0 / (double)max_fps : 0.0}, - &(GfxAppCallbacks){.init = init, - .update = update, - .render = render, - .resize = resize, - .shutdown = shutdown}); + gfx_app_run( + &(GfxAppDesc){ + .argc = argc, + .argv = argv, + .width = initial_width, + .height = initial_height, + .max_fps = max_fps, + .update_delta_time = max_fps > 0 ? 1.0 / (double)max_fps : 0.0}, + &(GfxAppCallbacks){ + .init = init, + .update = update, + .render = render, + .resize = resize, + .shutdown = shutdown}); return 0; } -- cgit v1.2.3