gramods
Loading...
Searching...
No Matches
ImageTexture.hh
1
2#ifndef GRAMODS_GRAPHICS_IMAGETEXTURE
3#define GRAMODS_GRAPHICS_IMAGETEXTURE
4
5#include <gmGraphics/config.hh>
6
7#ifdef gramods_ENABLE_FreeImage
8
9// Required before gmCore/OFactory.hh for some compilers
10#include <gmCore/io_size.hh>
11
12#include <gmCore/OFactory.hh>
13#include <gmCore/Updateable.hh>
14
15#include <gmGraphics/Texture.hh>
16
17#include <memory>
18
19BEGIN_NAMESPACE_GMGRAPHICS;
20
26 : public gmGraphics::Texture,
27 public gmCore::Updateable {
28
29public:
30
32 virtual ~ImageTexture();
33
34 void initialize() override;
35
39 void update(clock::time_point t, size_t) override;
40
56 GLuint updateTexture(size_t frame_number, Eye eye) override;
57
67 void setFile(std::filesystem::path file);
68
72 std::filesystem::path getFile();
73
81 void setRange(gmCore::size2 range);
82
87 void setAutoRange(bool on);
88
94 void setLoop(bool on);
95
101 void setLogProgress(bool on);
102
110 void setExit(bool on);
111
118 void setMipmaps(bool on);
119
120 GM_OFI_DECLARE;
121
122private:
123
124 struct Impl;
125 std::unique_ptr<Impl> _impl;
126};
127
128END_NAMESPACE_GMGRAPHICS;
129
130#endif
131#endif
The Updateable class defines an interface for objects that may be updated, for example each execution...
Definition Updateable.hh:18
The ImageTexture reads image data from a specified file to populate its texture data.
Definition ImageTexture.hh:27
The base of classes providing texture data for rendering.
Definition Texture.hh:18
std::array< size_t, 2 > size2
Array of 2 size_t.
Definition io_size.hh:12
An indexed eye that can be rendered.
Definition Eye.hh:20
Definition ImageTexture.cpp:31