Files
ld58/code/os/core.c
James Bulman 187359f747 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
2025-10-04 21:42:04 +01:00

20 lines
398 B
C

#if OS_WINDOWS
#include "impl/windows/core.c"
#endif
Str8 FS_ReadEntireFile(M_Arena *arena, Str8 path) {
Str8 result = { 0 };
OS_Handle file = FS_FileOpen(path, FS_ACCESS_READ);
if (file.v[0]) {
result.count = FS_FileSize(file);
result.data = M_ArenaPush(arena, U8, .count = result.count);
FS_FileRead(file, result.data, result.count, 0);
FS_FileClose(file);
}
return result;
}