| 41 | } |
| 42 | |
| 43 | void ShaderProgram::CheckShaderError(GLuint id, const std::string& type) { |
| 44 | int check_flag; |
| 45 | char check_info[1024]; |
| 46 | if (type != "program") { |
| 47 | fk_->glGetShaderiv(id, GL_COMPILE_STATUS, &check_flag); |
| 48 | if (!check_flag) { |
| 49 | fk_->glGetShaderInfoLog(id, 1024, NULL, check_info); |
| 50 | LOGI("shader type: {}, error: {}", type, check_info); |
| 51 | } |
| 52 | } |
| 53 | else { |
| 54 | fk_->glGetShaderiv(id, GL_LINK_STATUS, &check_flag); |
| 55 | if (!check_flag) { |
| 56 | fk_->glGetProgramInfoLog(id, 1024, NULL, check_info); |
| 57 | LOGI("shader type: {}, error: {}", type, check_info); |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | int ShaderProgram::GetProgramId() { |
| 63 | return program_id_; |
nothing calls this directly
no outgoing calls
no test coverage detected