Correct variable naming in shader code.
This commit is contained in:
parent
f9a4518949
commit
01896962be
1 changed files with 6 additions and 6 deletions
12
src/shader.c
12
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);
|
||||
|
|
Loading…
Reference in a new issue