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
20 lines
398 B
C
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;
|
|
}
|