Drawing a textured quad

Added new assets
Loaded all texture assets into game state
Loaded the basic pipeline
Setup a hard-coded quad to test drawing
Created a very jank vertex struct
Added ReadEntireFile for filesystem
Added getting file size from file handle
Added a descriptor pool to each in flight frame
Changed Vk_BufferCreate to handle multiple uses
Added shader building to the windows.bat build script
This commit is contained in:
2025-10-04 21:42:04 +01:00
parent b1a805cea8
commit 187359f747
27 changed files with 470 additions and 57 deletions

View File

@@ -1,16 +1,34 @@
#if !defined(LD_GAME_CORE_H_)
#define LD_GAME_CORE_H_
typedef struct G_Image G_Image;
struct G_Image {
Vk_Image image;
Str8 name;
U32 width;
U32 height;
typedef struct G_Vertex G_Vertex;
struct G_Vertex {
F32 x, y, z, w;
F32 u, v;
U32 c;
U32 pad;
};
function void G_ImagesLoad(M_Arena *arena);
typedef struct G_Image G_Image;
struct G_Image {
Str8 name;
Vk_Image image;
};
typedef struct G_State G_State;
struct G_State {
M_Arena *arena;
U32 n_images;
G_Image *images;
U32 n_pipelines;
Vk_Pipeline *pipelines;
Vk_Buffer vbo;
};
function void G_ImagesLoad(G_State *game);
function void G_PipelinesLoad(G_State *game);
#endif // LD_GAME_CORE_H_