finish refactor

This commit is contained in:
2023-12-11 22:42:19 +02:00
parent 9e25f16b5a
commit 8542a7cb14
21 changed files with 1622 additions and 478 deletions
+5 -2
View File
@@ -3,6 +3,7 @@
#include <glad/gl.h>
#include "core.h"
#include "shader.h"
void read_shader_file(const char *path, char **buf) {
@@ -14,13 +15,15 @@ void read_shader_file(const char *path, char **buf) {
}
fseek(fp, 0, SEEK_END);
long filesize = ftell(fp);
u64 filesize = ftell(fp);
fseek(fp, 0, SEEK_SET);
*buf = malloc(filesize + 1);
(*buf)[filesize] = '\0';
fread(*buf, filesize, 1, fp);
u64 read = fread(*buf, filesize, 1, fp);
CORE_UNUSED(read);
fclose(fp);
}