// // Created by Vicente Ferrari Smith on 14.02.26. // #ifndef V_TEXTURE_H #define V_TEXTURE_H #include #include #include #include struct Renderer; typedef std::string texture_id; struct Texture { texture_id id; std::string path; uint32_t index; // NOTE: (vfs) stb_image wants s32 values for the width and height. int32_t width; int32_t height; int32_t channels; bool srgb; bool uploaded; VkImage image; VmaAllocation allocation; VkImageView view; uint32_t descriptor_index; }; struct TextureManager { std::unordered_map textures; TextureManager(); uint32_t load(const std::string& path, Renderer &renderer); }; inline TextureManager texture_manager; #endif //V_TEXTURE_H