mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 23:23:34 +00:00
still working on code refactoring
This commit is contained in:
39
runtime/Includes/Renderer/Images/TextureRegistry.h
git.filemode.normal_file
39
runtime/Includes/Renderer/Images/TextureRegistry.h
git.filemode.normal_file
@@ -0,0 +1,39 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* TextureRegistry.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/11 00:56:15 by maldavid #+# #+# */
|
||||
/* Updated: 2024/04/23 22:10:08 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __MLX_TEXTURE_MANAGER__
|
||||
#define __MLX_TEXTURE_MANAGER__
|
||||
|
||||
#include <Renderer/Images/TextureDescriptor.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
class TextureRegistry
|
||||
{
|
||||
public:
|
||||
TextureRegistry() = default;
|
||||
|
||||
inline void Clear();
|
||||
inline std::pair<NonOwningPtr<DrawableResource>, bool> RegisterTexture(NonOwningPtr<Texture> texture, int x, int y);
|
||||
inline bool IsTextureKnown(NonOwningPtr<Texture> texture) noexcept;
|
||||
inline void EraseTextures(NonOwningPtr<Texture> texture);
|
||||
|
||||
~TextureRegistry() = default;
|
||||
|
||||
private:
|
||||
std::unordered_set<TextureRenderDescriptor> m_texture_descriptors;
|
||||
};
|
||||
}
|
||||
|
||||
#include <Renderer/Image/TextureRegistry.inl>
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user