Skip to content

Commit

Permalink
Error log on compile shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
vandalo committed May 8, 2018
1 parent c639a6a commit a7514cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LCSEngine/Shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ bool Shader::linkShaders(shaderInfo* info)
glLinkProgram(shaderProgram);

GLint success;
GLchar infoLog;
GLchar infoLog[512];
glGetProgramiv(shaderProgram, GL_LINK_STATUS, &success);
if (!success) {
glGetProgramInfoLog(shaderProgram, 512, NULL, &infoLog);
glGetProgramInfoLog(shaderProgram, 512, NULL, infoLog);
LOG("Shader link error: %s", infoLog);
return false;
}
Expand Down

0 comments on commit a7514cd

Please sign in to comment.