| 163 | |
| 164 | template <typename T, size_t count> |
| 165 | bool request(const GLenum pname, std::array<T, count> & data) |
| 166 | { |
| 167 | glrequest<T>(pname, data.data()); |
| 168 | |
| 169 | static const size_t MAX_PSTRING_LENGTH { 37 }; // actually, it's 44 / average is 23, |
| 170 | // but 37 works for 452 of 462 glGet enums (98%) |
| 171 | |
| 172 | const std::string pstring{ glbinding::aux::Meta::getString(pname) }; |
| 173 | const std::string spaces{ std::string((glbinding::aux::Meta::getString(pname).length() > 37) ? 0 : (MAX_PSTRING_LENGTH - pstring.length()), ' ') }; |
| 174 | |
| 175 | if (glGetError() != gl::GL_NO_ERROR) |
| 176 | { |
| 177 | std::cout << "\t" << pstring << spaces << " = NOT AVAILABLE"; |
| 178 | return false; |
| 179 | } |
| 180 | std::cout << "\t" << glbinding::aux::Meta::getString(pname) << spaces << " = " << string<T, count>(data); |
| 181 | return true; |
| 182 | } |
| 183 | |
| 184 | template <typename T> |
| 185 | bool request(const GLenum pname, std::vector<T> & data, size_t count) |
nothing calls this directly
no test coverage detected