From 9f57fe66fb638be0566fb78dc75d74b8a650f725 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sun, 29 Jan 2023 17:49:53 -0800 Subject: Rename gfx application window title. --- gfx-app/src/gfx_app.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gfx-app/src/gfx_app.c b/gfx-app/src/gfx_app.c index f3f0473..018e997 100644 --- a/gfx-app/src/gfx_app.c +++ b/gfx-app/src/gfx_app.c @@ -9,11 +9,11 @@ /// Application state. typedef struct GfxApp { - void* app_state; + void* app_state; GfxAppCallbacks callbacks; - int max_fps; - double update_delta_time; - GLFWwindow* window; + int max_fps; + double update_delta_time; + GLFWwindow* window; } GfxApp; /// Storing the application state in a global variable so that we can call the @@ -32,10 +32,10 @@ static void loop(GfxApp* app) { const double min_frame_time = app->max_fps > 0 ? 1.0 / (double)(app->max_fps) : 0.0; - const double update_dt = app->update_delta_time; - double time = 0.0; - double time_budget = 0.0; - Timer timer = timer_make(); + const double update_dt = app->update_delta_time; + double time = 0.0; + double time_budget = 0.0; + Timer timer = timer_make(); // Warm up the rendering before entering the main loop. A renderer can compile // shaders and do other initialization the first time it renders a scene. @@ -57,7 +57,7 @@ static void loop(GfxApp* app) { glfwSwapBuffers(app->window); glfwPollEvents(); - const time_point frame_end = time_now(); + const time_point frame_end = time_now(); const time_delta frame_time = time_diff(timer.last_tick, frame_end); if (min_frame_time > 0.0 && frame_time < min_frame_time) { time_sleep(min_frame_time - frame_time); @@ -71,10 +71,10 @@ bool gfx_app_run(const GfxAppDesc* desc, const GfxAppCallbacks* callbacks) { bool success = false; - g_gfx_app.callbacks = *callbacks; - g_gfx_app.max_fps = desc->max_fps; + g_gfx_app.callbacks = *callbacks; + g_gfx_app.max_fps = desc->max_fps; g_gfx_app.update_delta_time = desc->update_delta_time; - g_gfx_app.window = 0; + g_gfx_app.window = 0; if (!glfwInit()) { LOGE("glfwInit() failed"); @@ -91,8 +91,8 @@ bool gfx_app_run(const GfxAppDesc* desc, const GfxAppCallbacks* callbacks) { // TODO: Test antialiasing later on. // glfwWindowHint(GLFW_SAMPLES, 4); - g_gfx_app.window = - glfwCreateWindow(desc->width, desc->height, "space", NULL, NULL); + g_gfx_app.window = glfwCreateWindow( + desc->width, desc->height, "Gfx Application", NULL, NULL); if (!g_gfx_app.window) { LOGE("glfwCreateWindow() failed"); goto cleanup; -- cgit v1.2.3