From 4ff11620fff7d6b62e6ad57421c3ec1878aa8080 Mon Sep 17 00:00:00 2001 From: onelin Date: Sun, 30 Nov 2025 00:37:50 +0100 Subject: Fix not returning compiled shader --- src/gl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gl.c') diff --git a/src/gl.c b/src/gl.c index 819b534..9c9e6da 100644 --- a/src/gl.c +++ b/src/gl.c @@ -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; } -- cgit v1.3