template<std::uint32_t S, class MappingFunc>
nCine::GLHashMap class

Naive fixed-size hashmap of OpenGL targets to object ids.

Stores one object id per bucket, where MappingFunc maps an OpenGL target (the key) to a bucket index. Used to cache the currently bound object id for each target. The number of buckets S must match the range of the mapping function.

Constructors, destructors, conversion operators

GLHashMap()

Public functions

auto operator[](key_t key) -> value_t&
Returns the bucket for a target, mapping the key through the mapping function.