summaryrefslogtreecommitdiff
path: root/src/camera.h
blob: 199f0b4189d67f01df22aaf7d5b0df3ee113310f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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);