From 01896962be1cb9cba487b6dcf3628fabc4652d66 Mon Sep 17 00:00:00 2001 From: Marcel Plch Date: Sun, 29 Sep 2024 22:09:44 +0200 Subject: [PATCH] Correct variable naming in shader code. --- src/shader.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/shader.c b/src/shader.c index ad50853..6d72a35 100644 --- a/src/shader.c +++ b/src/shader.c @@ -30,7 +30,7 @@ load_code(const char *filepath, char **code) { static int compile_code(const char *filepath, const char *code, - GLuint ShaderID, GLint *Result) { + GLuint ShaderID, GLint *result) { int InfoLogLength; // Compile Shader printf("Compiling shader : %s\n", filepath); @@ -38,7 +38,7 @@ compile_code(const char *filepath, const char *code, glCompileShader(ShaderID); // Check Shader - glGetShaderiv(ShaderID, GL_COMPILE_STATUS, Result); + glGetShaderiv(ShaderID, GL_COMPILE_STATUS, result); glGetShaderiv(ShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength); if (InfoLogLength > 0) { char *ShaderErrorMessage = malloc(InfoLogLength+1); @@ -71,15 +71,15 @@ LoadShaders(GLuint *programID, const char *vertex_file_path, goto end; } - GLint Result = GL_FALSE; + GLint result = GL_FALSE; // Compile Vertex Shader - if (compile_code(vertex_file_path, vertex_code, VertexShaderID, &Result)) { + if (compile_code(vertex_file_path, vertex_code, VertexShaderID, &result)) { goto end; } // Compile Fragment Shader - if (compile_code(fragment_file_path, fragment_code, FragmentShaderID, &Result)) { + if (compile_code(fragment_file_path, fragment_code, FragmentShaderID, &result)) { goto end; } @@ -92,7 +92,7 @@ LoadShaders(GLuint *programID, const char *vertex_file_path, GLint InfoLogLength; // Check the program - glGetProgramiv(*programID, GL_LINK_STATUS, &Result); + glGetProgramiv(*programID, GL_LINK_STATUS, &result); glGetProgramiv(*programID, GL_INFO_LOG_LENGTH, &InfoLogLength); if (InfoLogLength > 0) { char *ProgramErrorMessage = malloc(InfoLogLength+1);