Cogs.Core
TextureGenerator.h
1#pragma once
2
3#include "ImageType.h"
4#include "Resources/Resources.h"
5#include "Utilities/Parsing.h"
6
7#include "Foundation/Reflection/Name.h"
8#include "Foundation/StringView.h"
9
10#include <memory>
11
12namespace Cogs
13{
14 namespace Core
15 {
16 class Context;
17
18 struct ImageCache;
19
21 {
22 public:
23 TextureGenerator(Context * context);
25
26 void cleanup();
27
28 COGSCORE_DLL_API TextureHandle getTexture(ImageType type);
29 TextureHandle getTexture(ImageType type, ParsedValue parameters);
30 void getTexture(Texture * texture, const ImageDefinition & definition);
31
32 private:
33 Context * context;
34
35 std::unique_ptr<ImageCache> cache;
36 };
37 }
38}
39
40template<> inline Cogs::StringView getName<Cogs::Core::TextureGenerator>() { return "TextureGenerator"; }
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
Stores the parsed output of a key/value pair.
Definition: Parsing.h:32
Texture resources contain raster bitmap data to use for texturing.
Definition: Texture.h:91