| 40 | |
| 41 | template <typename Functions> |
| 42 | std::string programInfoLog(Functions& functions, GLuint program) { |
| 43 | GLint log_length = 0; |
| 44 | functions.glGetProgramiv(program, GL_INFO_LOG_LENGTH, &log_length); |
| 45 | if (log_length <= 1) { |
| 46 | return {}; |
| 47 | } |
| 48 | |
| 49 | std::string log(static_cast<std::size_t>(log_length), '\0'); |
| 50 | GLsizei written = 0; |
| 51 | functions.glGetProgramInfoLog(program, log_length, &written, log.data()); |
| 52 | if (written > 0) { |
| 53 | log.resize(static_cast<std::size_t>(written)); |
| 54 | } |
| 55 | return trimNullTerminator(std::move(log)); |
| 56 | } |
| 57 | |
| 58 | template <typename Functions> |
| 59 | GLuint compileShader( |
no test coverage detected