gramods
ViewTexture.hh
1 
2 #ifndef GRAMODS_GRAPHICS_VIEWTEXTURE
3 #define GRAMODS_GRAPHICS_VIEWTEXTURE
4 
5 // Required before gmCore/OFactory.hh for some compilers
6 #include <gmCore/io_size.hh>
7 
8 #include <gmGraphics/View.hh>
9 #include <gmGraphics/TextureInterface.hh>
10 
11 
12 BEGIN_NAMESPACE_GMGRAPHICS;
13 
23  : public View,
24  public TextureInterface {
25 
26 public:
27 
28  ViewTexture();
29 
33  void renderFullPipeline(ViewSettings settings) override;
34 
40  void traverse(Visitor *visitor) override;
41 
48  void setResolution(gmCore::size2 res);
49 
54  void setUseFloat(bool on);
55 
60  bool getUseFloat();
61 
66  void setUseAlpha(bool on);
67 
71  bool getUseAlpha();
72 
78  void addView(std::shared_ptr<View> view);
79 
95  GLuint updateTexture(size_t frame_number, Eye eye) override;
96 
101  virtual std::string getDefaultKey() override { return "texture"; }
102 
103  GM_OFI_DECLARE;
104 
105 private:
106 
107  struct Impl;
108  std::unique_ptr<Impl> _impl;
109 
110 };
111 
112 END_NAMESPACE_GMGRAPHICS;
113 
114 #endif
The interface for classes providing texture data for rendering.
Definition: TextureInterface.hh:17
The ViewTexture is a View implements the TextureInterface to provide a texture of what is drawn by an...
Definition: ViewTexture.hh:24
virtual std::string getDefaultKey() override
Returns the default key, in Configuration, for the Object.
Definition: ViewTexture.hh:101
The base of graphics View implementations.
Definition: View.hh:13
std::array< size_t, 2 > size2
Array of 2 size_t.
Definition: io_size.hh:9
The visitor of a design pattern for automatic traversal.
Definition: Object.hh:75
An indexed eye that can be rendered.
Definition: Eye.hh:20
Package of settings affecting the rendering.
Definition: ViewBase.hh:30