summaryrefslogtreecommitdiff
path: root/gfx-app/include
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2023-06-24 18:46:13 -0700
committer3gg <3gg@shellblade.net>2023-06-24 18:46:13 -0700
commitcf886f4fa406ddd48f30c00ad3c77f9dc134af3a (patch)
treeabd916cf56b264a25257bcaade37caf1fbb974ac /gfx-app/include
parent9522580380393ae9d9b121f335579c5cfa5134f3 (diff)
Add option to set window title. Add function to get mouse position.
Diffstat (limited to 'gfx-app/include')
-rw-r--r--gfx-app/include/gfx/gfx_app.h4
1 files changed, 4 insertions, 0 deletions
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 {
9 int height; // Window height. 9 int height; // Window height.
10 int max_fps; // Desired maximum display framerate. 0 to disable. 10 int max_fps; // Desired maximum display framerate. 0 to disable.
11 double update_delta_time; // Desired delta time between frame updates. 11 double update_delta_time; // Desired delta time between frame updates.
12 const char* title; // Window title.
12} GfxAppDesc; 13} GfxAppDesc;
13 14
14typedef struct GfxAppCallbacks { 15typedef struct GfxAppCallbacks {
@@ -21,3 +22,6 @@ typedef struct GfxAppCallbacks {
21 22
22/// Create a window with an OpenGL context and run the main loop. 23/// Create a window with an OpenGL context and run the main loop.
23bool gfx_app_run(const GfxAppDesc*, const GfxAppCallbacks*); 24bool gfx_app_run(const GfxAppDesc*, const GfxAppCallbacks*);
25
26/// Get the mouse coordinates relative to the app's window.
27void gfx_app_get_mouse_position(double* x, double* y);