gramods
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 
19 BEGIN_NAMESPACE_GMGRAPHICS;
20 
26  : public gmGraphics::Texture,
27  public gmCore::Updateable {
28 
29 public:
30 
31  ImageTexture();
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 
112  GM_OFI_DECLARE;
113 
114 private:
115 
116  struct Impl;
117  std::unique_ptr<Impl> _impl;
118 };
119 
120 END_NAMESPACE_GMGRAPHICS;
121 
122 #endif
123 #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:9
An indexed eye that can be rendered.
Definition: Eye.hh:20
Definition: ImageTexture.cpp:30