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
|
static int
|
||||||
compile_code(const char *filepath, const char *code,
|
compile_code(const char *filepath, const char *code,
|
||||||
GLuint ShaderID, GLint *Result) {
|
GLuint ShaderID, GLint *result) {
|
||||||
int InfoLogLength;
|
int InfoLogLength;
|
||||||
// Compile Shader
|
// Compile Shader
|
||||||
printf("Compiling shader : %s\n", filepath);
|
printf("Compiling shader : %s\n", filepath);
|
||||||
|
@ -38,7 +38,7 @@ compile_code(const char *filepath, const char *code,
|
||||||
glCompileShader(ShaderID);
|
glCompileShader(ShaderID);
|
||||||
|
|
||||||
// Check Shader
|
// Check Shader
|
||||||
glGetShaderiv(ShaderID, GL_COMPILE_STATUS, Result);
|
glGetShaderiv(ShaderID, GL_COMPILE_STATUS, result);
|
||||||
glGetShaderiv(ShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
glGetShaderiv(ShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
||||||
if (InfoLogLength > 0) {
|
if (InfoLogLength > 0) {
|
||||||
char *ShaderErrorMessage = malloc(InfoLogLength+1);
|
char *ShaderErrorMessage = malloc(InfoLogLength+1);
|
||||||
|
@ -71,15 +71,15 @@ LoadShaders(GLuint *programID, const char *vertex_file_path,
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLint Result = GL_FALSE;
|
GLint result = GL_FALSE;
|
||||||
|
|
||||||
// Compile Vertex Shader
|
// 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;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compile Fragment Shader
|
// 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;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ LoadShaders(GLuint *programID, const char *vertex_file_path,
|
||||||
|
|
||||||
GLint InfoLogLength;
|
GLint InfoLogLength;
|
||||||
// Check the program
|
// Check the program
|
||||||
glGetProgramiv(*programID, GL_LINK_STATUS, &Result);
|
glGetProgramiv(*programID, GL_LINK_STATUS, &result);
|
||||||
glGetProgramiv(*programID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
glGetProgramiv(*programID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
||||||
if (InfoLogLength > 0) {
|
if (InfoLogLength > 0) {
|
||||||
char *ProgramErrorMessage = malloc(InfoLogLength+1);
|
char *ProgramErrorMessage = malloc(InfoLogLength+1);
|
||||||
|
|
Loading…
Reference in a new issue