MCPcopy Create free account
hub / github.com/chrxh/alien / checkCompileErrors

Method checkCompileErrors

source/Gui/Shader.cpp:101–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void _Shader::checkCompileErrors(GLuint shader, std::string type)
102{
103 GLint success;
104 GLchar infoLog[1024];
105 if (type != "PROGRAM") {
106 glGetShaderiv(shader, GL_COMPILE_STATUS, &success);
107 if (!success) {
108 glGetShaderInfoLog(shader, 1024, NULL, infoLog);
109 std::cout << "ERROR::SHADER_COMPILATION_ERROR of type: " << type << "\n"
110 << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
111 }
112 } else {
113 glGetProgramiv(shader, GL_LINK_STATUS, &success);
114 if (!success) {
115 glGetProgramInfoLog(shader, 1024, NULL, infoLog);
116 std::cout << "ERROR::PROGRAM_LINKING_ERROR of type: " << type << "\n"
117 << infoLog << "\n -- --------------------------------------------------- -- " << std::endl;
118 }
119 }
120}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected