1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 06:27:45 +00:00

LibGL: Refactor TextureNameAllocator to a more general NameAllocator

This functionality can also be used for other types of objects.
This commit is contained in:
cflip 2022-11-13 15:04:55 -07:00 committed by Andreas Kling
parent 9a0bb8212a
commit 892006218a
7 changed files with 67 additions and 61 deletions

View file

@ -15,7 +15,7 @@
#include <AK/Tuple.h>
#include <AK/Variant.h>
#include <AK/Vector.h>
#include <LibGL/Tex/NameAllocator.h>
#include <LibGL/NameAllocator.h>
#include <LibGL/Tex/Texture.h>
#include <LibGL/Tex/TextureUnit.h>
#include <LibGPU/Device.h>
@ -373,7 +373,7 @@ private:
return static_cast<T*>(default_texture.value());
}
TextureNameAllocator m_name_allocator;
NameAllocator m_texture_name_allocator;
HashMap<GLuint, RefPtr<Texture>> m_allocated_textures;
HashMap<GLenum, RefPtr<Texture>> m_default_textures;
Vector<TextureUnit> m_texture_units;