24 lines
407 B
C
24 lines
407 B
C
#ifndef __CAMERA_H__
|
|
#define __CAMERA_H__
|
|
|
|
enum CAMERA_PROJECTION {
|
|
CAMERA_ORTHOGRAPHIC = 0,
|
|
CAMERA_PERSPECTIVE
|
|
};
|
|
|
|
typedef struct CameraMatrices {
|
|
mat4 view;
|
|
mat4 projection;
|
|
} CameraMatrices;
|
|
|
|
typedef struct Camera {
|
|
vec3 position;
|
|
int projection;
|
|
struct CameraMatrices* m;
|
|
} Camera;
|
|
|
|
Camera* create_camera(vec2 pos);
|
|
void update_camera(Camera* camera, Window window);
|
|
|
|
#endif
|