Shader tab fix.

This commit is contained in:
Joey de Vries
2017-05-28 08:56:30 +02:00
parent e84046aecc
commit d78752800f
3 changed files with 60 additions and 60 deletions

View File

@@ -167,28 +167,28 @@ private:
// utility function for checking shader compilation/linking errors. // utility function for checking shader compilation/linking errors.
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
void checkCompileErrors(GLuint shader, std::string type) void checkCompileErrors(GLuint shader, std::string type)
{ {
GLint success; GLint success;
GLchar infoLog[1024]; GLchar infoLog[1024];
if(type != "PROGRAM") if(type != "PROGRAM")
{ {
glGetShaderiv(shader, GL_COMPILE_STATUS, &success); glGetShaderiv(shader, GL_COMPILE_STATUS, &success);
if(!success) if(!success)
{ {
glGetShaderInfoLog(shader, 1024, NULL, infoLog); glGetShaderInfoLog(shader, 1024, NULL, infoLog);
std::cout << "ERROR::SHADER_COMPILATION_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl; std::cout << "ERROR::SHADER_COMPILATION_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
} }
} }
else else
{ {
glGetProgramiv(shader, GL_LINK_STATUS, &success); glGetProgramiv(shader, GL_LINK_STATUS, &success);
if(!success) if(!success)
{ {
glGetProgramInfoLog(shader, 1024, NULL, infoLog); glGetProgramInfoLog(shader, 1024, NULL, infoLog);
std::cout << "ERROR::PROGRAM_LINKING_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl; std::cout << "ERROR::PROGRAM_LINKING_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
} }
} }
} }
}; };
#endif #endif

View File

@@ -141,28 +141,28 @@ private:
// utility function for checking shader compilation/linking errors. // utility function for checking shader compilation/linking errors.
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
void checkCompileErrors(GLuint shader, std::string type) void checkCompileErrors(GLuint shader, std::string type)
{ {
GLint success; GLint success;
GLchar infoLog[1024]; GLchar infoLog[1024];
if(type != "PROGRAM") if (type != "PROGRAM")
{ {
glGetShaderiv(shader, GL_COMPILE_STATUS, &success); glGetShaderiv(shader, GL_COMPILE_STATUS, &success);
if(!success) if (!success)
{ {
glGetShaderInfoLog(shader, 1024, NULL, infoLog); glGetShaderInfoLog(shader, 1024, NULL, infoLog);
std::cout << "ERROR::SHADER_COMPILATION_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl; std::cout << "ERROR::SHADER_COMPILATION_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
} }
} }
else else
{ {
glGetProgramiv(shader, GL_LINK_STATUS, &success); glGetProgramiv(shader, GL_LINK_STATUS, &success);
if(!success) if (!success)
{ {
glGetProgramInfoLog(shader, 1024, NULL, infoLog); glGetProgramInfoLog(shader, 1024, NULL, infoLog);
std::cout << "ERROR::PROGRAM_LINKING_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl; std::cout << "ERROR::PROGRAM_LINKING_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
} }
} }
} }
}; };
#endif #endif

View File

@@ -97,28 +97,28 @@ private:
// utility function for checking shader compilation/linking errors. // utility function for checking shader compilation/linking errors.
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
void checkCompileErrors(GLuint shader, std::string type) void checkCompileErrors(GLuint shader, std::string type)
{ {
GLint success; GLint success;
GLchar infoLog[1024]; GLchar infoLog[1024];
if(type != "PROGRAM") if (type != "PROGRAM")
{ {
glGetShaderiv(shader, GL_COMPILE_STATUS, &success); glGetShaderiv(shader, GL_COMPILE_STATUS, &success);
if(!success) if (!success)
{ {
glGetShaderInfoLog(shader, 1024, NULL, infoLog); glGetShaderInfoLog(shader, 1024, NULL, infoLog);
std::cout << "ERROR::SHADER_COMPILATION_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl; std::cout << "ERROR::SHADER_COMPILATION_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
} }
} }
else else
{ {
glGetProgramiv(shader, GL_LINK_STATUS, &success); glGetProgramiv(shader, GL_LINK_STATUS, &success);
if(!success) if (!success)
{ {
glGetProgramInfoLog(shader, 1024, NULL, infoLog); glGetProgramInfoLog(shader, 1024, NULL, infoLog);
std::cout << "ERROR::PROGRAM_LINKING_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl; std::cout << "ERROR::PROGRAM_LINKING_ERROR of type: " << type << "\n" << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
} }
} }
} }
}; };
#endif #endif