MCPcopy Create free account
hub / github.com/SFML/SFML / getMaxTextureUnits

Function getMaxTextureUnits

src/SFML/Graphics/Shader.cpp:69–80  ·  view source on GitHub ↗

Retrieve the maximum number of texture units available

Source from the content-addressed store, hash-verified

67{
68// Retrieve the maximum number of texture units available
69std::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
83bool getFileContents(const std::filesystem::path& filename, std::vector<char>& buffer)

Callers 1

setUniformMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected