diff options
| author | onelin <oscar@nelin.dk> | 2025-11-29 23:37:50 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2025-12-18 21:14:17 +0000 |
| commit | 4ff11620fff7d6b62e6ad57421c3ec1878aa8080 (patch) | |
| tree | 7b94ba6b2d08c4114814e3b918638b8becf9b71e /src/gl.c | |
| parent | f07532676f147f7cb3024871df3d7e664f390fed (diff) | |
Fix not returning compiled shader
Diffstat (limited to 'src/gl.c')
| -rw-r--r-- | src/gl.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -63,7 +63,7 @@ Shader compile_shader(const char* source, const ShaderType shader_type) { } Shader compile_shader_f(const char* file_path, const ShaderType shader_type) { - u32 shaderID = 0; + Shader s; char* source = NULL; FILE* file = NULL; @@ -92,11 +92,11 @@ Shader compile_shader_f(const char* file_path, const ShaderType shader_type) { // Compile shader INFO("Compiling shader \"" TERM_COLOR_YELLOW "%s" TERM_COLOR_RESET"\".", file_path); - compile_shader(source, shader_type); + s = compile_shader(source, shader_type); free(source); - return (Shader){.program = shaderID, .type = shader_type}; + return s; } |
