/* * Copyright (c) 2021, Jesse Buhagiar * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace GL { class TextureNameAllocator { public: TextureNameAllocator() = default; void allocate(GLsizei count, GLuint* textures); void free(GLuint texture); private: Stack m_free_texture_names; GLuint m_last_texture_id { 1 }; }; }