summaryrefslogtreecommitdiff
path: root/src/camera.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/camera.h')
-rw-r--r--src/camera.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/camera.h b/src/camera.h
new file mode 100644
index 0000000..199f0b4
--- /dev/null
+++ b/src/camera.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "cglm/types.h"
+#include "shader.h"
+
+struct camera {
+ vec3 position;
+ vec3 direction;
+ vec3 up;
+ mat4 view;
+ mat4 perspective;
+ float fov;
+};
+
+void camera_init(struct camera** camera);
+void camera_update(struct camera* camera, struct shader* shader);
+void camera_set_position(struct camera* camera, vec3 pos);
+void camera_move(struct camera* camera, vec3 move);