From 1c9c56ca3b00a0ed3951caa100199200629b7f47 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 5 Oct 2024 11:48:16 -0700 Subject: Using new cstring. --- gfx/src/core/shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/src/core/shader.c b/gfx/src/core/shader.c index af2f89f..dded084 100644 --- a/gfx/src/core/shader.c +++ b/gfx/src/core/shader.c @@ -51,7 +51,7 @@ static GLuint create_shader(const ShaderDesc* desc) { const char* source_bits[] = {header, lstring_cstr(&defines), desc->code}; const GLint source_lengths[] = { - strlen(header), lstring_length(defines), strlen(desc->code)}; + strlen(header), lstring_length(&defines), strlen(desc->code)}; glShaderSource(shader, 3, source_bits, source_lengths); glCompileShader(shader); @@ -83,7 +83,7 @@ bool gfx_compile_shader(Shader* shader, const ShaderDesc* desc) { void gfx_del_shader(Shader* shader) { assert(shader); - + if (shader->id) { glDeleteShader(shader->id); shader->id = 0; -- cgit v1.2.3