Retrieve the maximum number of texture units available
| 67 | { |
| 68 | // Retrieve the maximum number of texture units available |
| 69 | std::size_t getMaxTextureUnits() |
| 70 | { |
| 71 | static const GLint maxUnits = [] |
| 72 | { |
| 73 | GLint value = 0; |
| 74 | glCheck(glGetIntegerv(GLEXT_GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &value)); |
| 75 | |
| 76 | return value; |
| 77 | }(); |
| 78 | |
| 79 | return static_cast<std::size_t>(maxUnits); |
| 80 | } |
| 81 | |
| 82 | // Read the contents of a file into an array of char |
| 83 | bool getFileContents(const std::filesystem::path& filename, std::vector<char>& buffer) |