MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / GetIndex

Function GetIndex

SampleFramework12/v1.00/Utility.h:113–119  ·  view source on GitHub ↗

Gets an index from an index buffer

Source from the content-addressed store, hash-verified

111
112// Gets an index from an index buffer
113inline uint32 GetIndex(const void* indices, uint32 idx, uint32 indexSize)
114{
115 if(indexSize == 2)
116 return reinterpret_cast<const uint16*>(indices)[idx];
117 else
118 return reinterpret_cast<const uint32*>(indices)[idx];
119}
120
121
122template<typename T, uint64 N>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected