Loading...
Searching...
No Matches
TextureManager.h
Go to the documentation of this file.
1//
2// Created by denzel on 03/04/2025.
3//
4
5#ifndef TEXTUREMANAGER_H
6#define TEXTUREMANAGER_H
7#include <string>
8#include <unordered_map>
9
10#include "hellfire/graphics/texture/Texture.h"
11
12namespace hellfire {
14 public:
16
17 Texture *get_texture(const std::string &path);
18
19 void add_texture(const std::string &path, Texture *texture) { textures_[path] = texture; }
20
21 void clear();
22
24 clear();
25 }
26
27 private:
29
31 }
32
34 };
35
36}
37
38
39#endif //TEXTUREMANAGER_H
void add_texture(const std::string &path, Texture *texture)
static TextureManager & get_instance()
static TextureManager * instance_
std::unordered_map< std::string, Texture * > textures_
Texture * get_texture(const std::string &path)