update djstdlib

This commit is contained in:
Daniel Ledda
2025-01-16 09:39:17 +01:00
parent c0deceec65
commit a0818f0950
8 changed files with 218 additions and 157 deletions

View File

@@ -1,6 +1,7 @@
#include <glm/gtc/type_ptr.hpp>
#include "Shader.h"
#include "../lib/djstdlib/core.h"
#include "../lib/djstdlib/os.h"
#include "../lib/glad/glad.h"
enum ShaderType {
@@ -10,7 +11,7 @@ enum ShaderType {
uint32 createGlShader(string file_path, ShaderType shader_type) {
Scratch temp = scratchStart(0, 0);
string shader_code = readEntireFile(temp.arena, file_path);
string shader_code = os_readEntireFile(temp.arena, file_path);
GLuint shader = glCreateShader(shader_type);
const char *shader_code_cstr = cstring(temp.arena, shader_code);
glShaderSource(shader, 1, &shader_code_cstr, NULL);