Euphoria
texturecache.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <optional>
5 
6 
7 namespace eu::io
8 {
9  struct FileSystem;
10  struct FilePath;
11 }
12 
13 namespace eu::render
14 {
15  struct Texture2;
16 
17  struct TextureCache
18  {
19  explicit TextureCache(io::FileSystem* fs);
21 
22  TextureCache(const TextureCache& other) = delete;
23  void operator=(const TextureCache&) = delete;
24  TextureCache(TextureCache&& other) = delete;
25  void operator=(TextureCache&&) = delete;
26 
27  [[nodiscard]] std::shared_ptr<Texture2>
28  get_texture(const io::FilePath& path) const;
29 
30  [[nodiscard]] std::shared_ptr<Texture2>
31  get_texture(const std::optional<io::FilePath>& path) const;
32 
33  struct TextureCachePimpl;
34  std::unique_ptr<TextureCachePimpl> pimpl;
35  };
36 }
Definition: enum.h:8
TextureCache(const TextureCache &other)=delete
std::unique_ptr< TextureCachePimpl > pimpl
Definition: texturecache.h:33
void operator=(TextureCache &&)=delete
std::shared_ptr< Texture2 > get_texture(const io::FilePath &path) const
Definition: texturecache.cc:47
TextureCache(io::FileSystem *fs)
Definition: texturecache.cc:37
void operator=(const TextureCache &)=delete
TextureCache(TextureCache &&other)=delete