/* * Copyright (c) 2021, Jesse Buhagiar * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace GL { class NameAllocator { public: NameAllocator() = default; void allocate(GLsizei count, GLuint* names); void free(GLuint name); bool has_allocated_name(GLuint name) const; private: Stack m_free_names; GLuint m_last_id { 1 }; }; }