2026-05-02 21:24:21 -04:00
|
|
|
//
|
|
|
|
|
// Created by slinky on 5/1/26.
|
|
|
|
|
//
|
|
|
|
|
|
2026-05-04 00:41:34 -04:00
|
|
|
#ifndef B_ENGINE_TEXTUREMANAGER_H
|
|
|
|
|
#define B_ENGINE_TEXTUREMANAGER_H
|
2026-05-02 21:24:21 -04:00
|
|
|
|
2026-05-17 19:12:27 -05:00
|
|
|
#include <filesystem>
|
2026-05-02 21:24:21 -04:00
|
|
|
#include <memory>
|
|
|
|
|
#include <unordered_map>
|
|
|
|
|
|
|
|
|
|
#include "Texture.h"
|
2026-05-17 19:12:27 -05:00
|
|
|
#include "uuid.h"
|
2026-05-02 21:24:21 -04:00
|
|
|
|
2026-05-04 00:41:34 -04:00
|
|
|
class TextureManager {
|
2026-05-02 21:24:21 -04:00
|
|
|
public:
|
2026-05-17 19:12:27 -05:00
|
|
|
static std::unordered_map<uuids::uuid, std::unique_ptr<Texture>> textures;
|
2026-05-02 21:24:21 -04:00
|
|
|
|
2026-05-17 19:12:27 -05:00
|
|
|
static std::unique_ptr<Texture> load_from_file(std::string_view filePath);
|
|
|
|
|
static std::unique_ptr<Texture> load_from_data(unsigned char* data, int width, int height, int channels);
|
2026-05-02 21:24:21 -04:00
|
|
|
};
|
|
|
|
|
|
2026-05-04 00:41:34 -04:00
|
|
|
#endif //B_ENGINE_TEXTUREMANAGER_H
|