Yet Another Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
texturecache.h
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "../data/texture.h"
13 
14 #include <unordered_map>
15 
16 namespace yage
17 {
18 
20 {
21 private:
22  std::unordered_map<std::string, Texture> texture_map_;
23 
24 public:
25  TextureCache() = default;
26 
27  Texture getTexture(std::string const &texture_path, int x = 1, int y = 1);
28 };
29 
30 } // namespace yage
Texture getTexture(std::string const &texture_path, int x=1, int y=1)
Definition: texturecache.cpp:17
TextureCache()=default
Definition: texture.h:17
Definition: texturecache.h:19