22 lines
543 B
C++
22 lines
543 B
C++
//
|
|
// Created by slinky on 5/1/26.
|
|
//
|
|
|
|
#ifndef B_ENGINE_TEXTUREMANAGER_H
|
|
#define B_ENGINE_TEXTUREMANAGER_H
|
|
|
|
#include <memory>
|
|
#include <unordered_map>
|
|
|
|
#include "ResourceHandle.h"
|
|
#include "Texture.h"
|
|
|
|
class TextureManager {
|
|
public:
|
|
static std::unordered_map<ResourceHandle, std::unique_ptr<Texture>> textures;
|
|
|
|
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);
|
|
};
|
|
|
|
#endif //B_ENGINE_TEXTUREMANAGER_H
|