summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/rodeo/gfx.h13
-rw-r--r--include/rodeo/gfx_t.h11
2 files changed, 24 insertions, 0 deletions
diff --git a/include/rodeo/gfx.h b/include/rodeo/gfx.h
index 15ce3ad..07d8430 100644
--- a/include/rodeo/gfx.h
+++ b/include/rodeo/gfx.h
@@ -147,6 +147,19 @@ rodeo_gfx_matrix_size(void);
uint32_t
rodeo_gfx_matrix_capacity(void);
+void
+rodeo_gfx_camera_2d_begin(rodeo_gfx_camera_2d_t camera);
+
+void
+rodeo_gfx_camera_2d_end(void);
+
+#define \
+mrodeo_gfx_camera_do(camera) \
+ mrodeo_defer_do( \
+ rodeo_gfx_camera_2d_begin(camera), \
+ rodeo_gfx_camera_2d_end() \
+ )
+
#define \
mrodeo_gfx_scissor_do(rectangle) \
mrodeo_defer_do( \
diff --git a/include/rodeo/gfx_t.h b/include/rodeo/gfx_t.h
index 63811c5..3d206c2 100644
--- a/include/rodeo/gfx_t.h
+++ b/include/rodeo/gfx_t.h
@@ -3,6 +3,7 @@
// -- internal --
// public
#include "rodeo_types.h"
+#include "rodeo/math/vec2_t.h"
// -- system --
#include <inttypes.h>
@@ -67,3 +68,13 @@ rodeo_gfx_vertex_t;
typedef uint16_t rodeo_gfx_index_t;
+typedef
+struct
+{
+ rodeo_math_vec2_t target;
+ float turns;
+ float zoom;
+ rodeo_math_vec2_t offset;
+}
+rodeo_gfx_camera_2d_t;
+