| 99 | } |
| 100 | |
| 101 | void _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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected