summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-10-05 11:48:16 -0700
committer3gg <3gg@shellblade.net>2024-10-05 11:48:16 -0700
commit1c9c56ca3b00a0ed3951caa100199200629b7f47 (patch)
tree058c760fdc50a4caf7008e14164ba836d8b84b91
parent68ba3c0f45faa71b989b0a05fd974405a21cfd7b (diff)
Using new cstring.HEADmain
-rw-r--r--gfx/src/core/shader.c4
1 files 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) {
51 51
52 const char* source_bits[] = {header, lstring_cstr(&defines), desc->code}; 52 const char* source_bits[] = {header, lstring_cstr(&defines), desc->code};
53 const GLint source_lengths[] = { 53 const GLint source_lengths[] = {
54 strlen(header), lstring_length(defines), strlen(desc->code)}; 54 strlen(header), lstring_length(&defines), strlen(desc->code)};
55 55
56 glShaderSource(shader, 3, source_bits, source_lengths); 56 glShaderSource(shader, 3, source_bits, source_lengths);
57 glCompileShader(shader); 57 glCompileShader(shader);
@@ -83,7 +83,7 @@ bool gfx_compile_shader(Shader* shader, const ShaderDesc* desc) {
83 83
84void gfx_del_shader(Shader* shader) { 84void gfx_del_shader(Shader* shader) {
85 assert(shader); 85 assert(shader);
86 86
87 if (shader->id) { 87 if (shader->id) {
88 glDeleteShader(shader->id); 88 glDeleteShader(shader->id);
89 shader->id = 0; 89 shader->id = 0;