MCPcopy Create free account
hub / github.com/cginternals/glbinding / alphabeticalGroupIndex

Method alphabeticalGroupIndex

source/glbinding-aux/source/Meta.cpp:47–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47size_t Meta::alphabeticalGroupIndex(const std::string & identifier, const std::uint8_t prefixLength)
48{
49 auto index = static_cast<size_t>(identifier[prefixLength]); // ignore prefix ('GL_' or 'gl')
50
51 // bold uppercase conversion -> non letters are discarded in next step
52 if (index > 96)
53 {
54 index -= 32;
55 }
56
57 // every non upper case letter is assigned to index 0
58 if (index < 65 || index > 90)
59 {
60 index = 64;
61 }
62 index -= 64;
63
64 return index;
65}
66
67std::vector<GLbitfield> Meta::bitfields()
68{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected