summaryrefslogtreecommitdiffhomepage
path: root/include/rodeo/gfx.h
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-06-07 00:50:58 -0400
committerrealtradam <[email protected]>2023-06-07 00:50:58 -0400
commitf1d321f054b1da072e9c965c20f45399c00af1c0 (patch)
treeb3e287403213207a5c5ced4dd8b7c16d30564856 /include/rodeo/gfx.h
parentd518023bb61dec8dd776e5cf7b2b23e66b2cdfdb (diff)
downloadRodeoKit-f1d321f054b1da072e9c965c20f45399c00af1c0.tar.gz
RodeoKit-f1d321f054b1da072e9c965c20f45399c00af1c0.zip
add letterboxing matrix
Diffstat (limited to 'include/rodeo/gfx.h')
-rw-r--r--include/rodeo/gfx.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/include/rodeo/gfx.h b/include/rodeo/gfx.h
index a10e901..151bdda 100644
--- a/include/rodeo/gfx.h
+++ b/include/rodeo/gfx.h
@@ -8,7 +8,7 @@
#include "stc/cstr.h"
void
-rodeo_gfx_init(void);
+rodeo_gfx_init(float width, float height);
void
rodeo_gfx_deinit(void);
@@ -79,19 +79,21 @@ rodeo_gfx_frame_limit_set(uint32_t limit);
uint32_t
rodeo_gfx_frame_limit_get(void);
-#define \
-mrodeo_gfx_do( \
-) \
- mrodeo_defer_do( \
- rodeo_gfx_init(), \
- rodeo_gfx_deinit() \
- )
-
-
#define \
-mrodeo_gfx_frame_do( \
+mrodeo_gfx_do( \
+ width, \
+ height \
) \
mrodeo_defer_do( \
+ rodeo_gfx_init(width, height), \
+ rodeo_gfx_deinit() \
+ )
+
+
+#define \
+mrodeo_gfx_frame_do( \
+) \
+ mrodeo_defer_do( \
rodeo_gfx_frame_begin(), \
rodeo_gfx_frame_end() \
)