blob: 0406d4e2ca5554fe1488479f6b282a7e5dd80d2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#pragma once
#include <Magnum/Trade/ImageData.h>
#include <string>
#include <optional>
#include <memory>
namespace Magnum::Examples {
struct atlas_texture;
using atlas_ptr = std::shared_ptr<atlas_texture>;
struct loader_
{
virtual std::string shader(const std::string& filename) = 0;
virtual Trade::ImageData2D tile_texture(const std::string& filename) = 0;
virtual atlas_ptr tile_atlas(const std::string& filename) = 0;
static void destroy();
loader_(const loader_&) = delete;
loader_& operator=(const loader_&) = delete;
virtual ~loader_();
protected:
loader_();
};
extern loader_& loader; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
} // namespace Magnum::Examples
|