From cf886f4fa406ddd48f30c00ad3c77f9dc134af3a Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 24 Jun 2023 18:46:13 -0700 Subject: Add option to set window title. Add function to get mouse position. --- gfx-app/include/gfx/gfx_app.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gfx-app/include') diff --git a/gfx-app/include/gfx/gfx_app.h b/gfx-app/include/gfx/gfx_app.h index 4744992..0033bde 100644 --- a/gfx-app/include/gfx/gfx_app.h +++ b/gfx-app/include/gfx/gfx_app.h @@ -9,6 +9,7 @@ typedef struct GfxAppDesc { int height; // Window height. int max_fps; // Desired maximum display framerate. 0 to disable. double update_delta_time; // Desired delta time between frame updates. + const char* title; // Window title. } GfxAppDesc; typedef struct GfxAppCallbacks { @@ -21,3 +22,6 @@ typedef struct GfxAppCallbacks { /// Create a window with an OpenGL context and run the main loop. bool gfx_app_run(const GfxAppDesc*, const GfxAppCallbacks*); + +/// Get the mouse coordinates relative to the app's window. +void gfx_app_get_mouse_position(double* x, double* y); -- cgit v1.2.3