15#include "AUI/Common/AQueue.h"
19 enum class ResourceKind {
26 template<ResourceKind T>
30 static GLuint gen()
noexcept {
35 static void del(GLuint b)
noexcept {
36 glDeleteBuffers(1, &b);
43 template<>
struct resource<ResourceKind::TEXTURE> {
44 static GLuint gen()
noexcept {
49 static void del(GLuint b)
noexcept {
50 glDeleteTextures(1, &b);
55 template<ResourceKind T>
63 static void put(GLuint obj) {
64 inst().mObjects.push(obj);
68 while (!mObjects.empty()) {
A std::queue with AUI extensions.
Definition AQueue.h:24
StoredType popOrGenerate(Factory factory) noexcept(noexcept(factory()))
Pops the element and returns it. If queue is empty, the result of factory() returned....
Definition AQueue.h:83
Definition ResourcePool.h:56
Definition ResourcePool.h:29
Definition ResourcePool.h:27