2024-05-03 22:52:53 +12:00
|
|
|
#ifndef __CAMERA_H__
|
|
|
|
#define __CAMERA_H__
|
|
|
|
|
2024-05-05 14:25:05 +12:00
|
|
|
enum CAMERA_PROJECTION {
|
|
|
|
CAMERA_ORTHOGRAPHIC = 0,
|
|
|
|
CAMERA_PERSPECTIVE
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct CameraMatrices {
|
2024-05-03 22:52:53 +12:00
|
|
|
mat4 view;
|
|
|
|
mat4 projection;
|
2024-05-05 14:25:05 +12:00
|
|
|
} CameraMatrices;
|
|
|
|
|
|
|
|
typedef struct Camera {
|
|
|
|
vec3 position;
|
|
|
|
int projection;
|
|
|
|
struct CameraMatrices* m;
|
2024-05-03 22:52:53 +12:00
|
|
|
} Camera;
|
|
|
|
|
2024-05-05 14:25:05 +12:00
|
|
|
Camera* create_camera(vec2 pos);
|
|
|
|
void update_camera(Camera* camera, Window window);
|
2024-05-03 22:52:53 +12:00
|
|
|
|
|
|
|
#endif
|