1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:37:35 +00:00

LibGL: Implement basic texture units

These are merely a way to hold the different texture target bind
points that a texture can be bound to.
This commit is contained in:
Jesse Buhagiar 2021-05-30 16:15:26 +10:00 committed by Linus Groh
parent 2b5732ab77
commit 52e5d3c961
4 changed files with 74 additions and 0 deletions

View file

@ -12,6 +12,7 @@
#include "SoftwareRasterizer.h"
#include "Tex/NameAllocator.h"
#include "Tex/Texture.h"
#include "Tex/TextureUnit.h"
#include <AK/HashMap.h>
#include <AK/RefPtr.h>
#include <AK/Tuple.h>
@ -138,6 +139,8 @@ private:
// Texture objects
TextureNameAllocator m_name_allocator;
HashMap<GLuint, RefPtr<Texture>> m_allocated_textures;
Array<TextureUnit, 32> m_texture_units;
TextureUnit* m_active_texture_unit { &m_texture_units[0] };
SoftwareRasterizer m_rasterizer;