Added camera

Moved some math types
Added some more vector types
Did the camera matrix calulations
Updated shaders to take push constants
This commit is contained in:
2025-10-05 02:40:59 +01:00
parent 2c67896cf2
commit 3b8c50a361
15 changed files with 355 additions and 70 deletions

View File

@@ -15,6 +15,17 @@ struct G_Image {
Vk_Image image;
};
typedef struct G_Camera G_Camera;
struct G_Camera {
V3f x, y, z;
V3f p;
F32 fov;
F32 nearp, farp;
Mat4x4FInv proj;
};
typedef struct G_State G_State;
struct G_State {
M_Arena *arena;
@@ -26,11 +37,17 @@ struct G_State {
Vk_Pipeline *pipelines;
Vk_Buffer vbo;
G_Camera camera;
};
function void G_ImagesLoad(G_State *game);
function void G_PipelinesLoad(G_State *game);
function void G_CalulateCamera(G_Camera *camera, F32 aspect);
#include "aabb.h"
#include "player.h"
#include "nav.h"