summaryrefslogtreecommitdiff
path: root/src/gl.c
diff options
context:
space:
mode:
authoronelin <oscar@nelin.dk>2025-11-29 23:37:50 +0000
committeronelin <oscar@nelin.dk>2025-12-18 21:14:17 +0000
commit4ff11620fff7d6b62e6ad57421c3ec1878aa8080 (patch)
tree7b94ba6b2d08c4114814e3b918638b8becf9b71e /src/gl.c
parentf07532676f147f7cb3024871df3d7e664f390fed (diff)
Fix not returning compiled shader
Diffstat (limited to 'src/gl.c')
-rw-r--r--src/gl.c6
1 files changed, 3 insertions, 3 deletions
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;
}