#pragma once #include "raylib.h" #include #include struct TextureSource { std::string path; }; class TextureManager { public: TextureManager(); ~TextureManager(); // Load a texture from a file // Returns a unique ID for the texture, or 0 on failure unsigned int Load(const std::string& path); // Unload a texture by ID void Unload(unsigned int id); // Get a texture by ID (returns nullptr if not found) Texture2D* Get(unsigned int id); // Get source metadata for a texture if available const TextureSource* GetSource(unsigned int id) const; // Unload all textures void UnloadAll(); private: std::unordered_map textures; std::unordered_map textureSources; unsigned int nextId; bool unloaded; };