summaryrefslogtreecommitdiff
path: root/src/engine/M_camera.h
blob: 4663a94266115d54037db617211cc6857bd9d46f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <cglm/cglm.h>
#include <cglm/mat4.h>
#include <cglm/vec3.h>

typedef struct {
	vec3 pos;
	vec3 direction;
	vec3 up;

	mat4 view_matrix;
} M_Camera;


void M_initCamera(M_Camera *camera, vec3 up);

//Generates the M_Camera's view matrix required for rendering
void M_cameraViewMatrix(M_Camera *camera);