aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mgl/graphics/vertex_buffer.h2
-rw-r--r--include/mgl/system/clock.h13
2 files changed, 14 insertions, 1 deletions
diff --git a/include/mgl/graphics/vertex_buffer.h b/include/mgl/graphics/vertex_buffer.h
index 5cdadfa..0dfd0d6 100644
--- a/include/mgl/graphics/vertex_buffer.h
+++ b/include/mgl/graphics/vertex_buffer.h
@@ -27,6 +27,6 @@ void mgl_vertex_buffer_deinit(mgl_vertex_buffer *self);
void mgl_vertex_buffer_set_position(mgl_vertex_buffer *self, mgl_vec2f position);
int mgl_vertex_buffer_update(mgl_vertex_buffer *self, const mgl_vertex *vertices, size_t vertex_count);
/* |texture| can be NULL to not use any texture */
-void mgl_vertex_buffer_draw(mgl_context *context, mgl_vertex_buffer *self, const mgl_texture *texture);
+void mgl_vertex_buffer_draw(mgl_context *context, mgl_vertex_buffer *vertex_buffer, const mgl_texture *texture);
#endif /* MGL_VERTEX_BUFFER_H */
diff --git a/include/mgl/system/clock.h b/include/mgl/system/clock.h
new file mode 100644
index 0000000..f207ff7
--- /dev/null
+++ b/include/mgl/system/clock.h
@@ -0,0 +1,13 @@
+#ifndef MGL_CLOCK_H
+#define MGL_CLOCK_H
+
+typedef struct {
+ double captured_seconds;
+} mgl_clock;
+
+void mgl_clock_init(mgl_clock *self);
+/* Returns the elapsed time in seconds since the last restart or init, before resetting the clock */
+double mgl_clock_restart(mgl_clock *self);
+double mgl_clock_get_elapsed_time_seconds(mgl_clock *self);
+
+#endif /* MGL_CLOCK_H */