UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
rendertexture.h
Go to the documentation of this file.
1 #ifndef UGDK_GRAPHIC_RENDERTEXTURE_H_
2 #define UGDK_GRAPHIC_RENDERTEXTURE_H_
3 
5 
6 #include <ugdk/math.h>
8 
9 #include <memory>
10 
11 namespace ugdk {
12 namespace graphic {
13 
14 class RenderTexture : public RenderTarget {
15  public:
16  RenderTexture(std::unique_ptr<graphic::GLTexture>&& texture);
19 
20  virtual math::Vector2D size() const override;
21  graphic::GLTexture* texture() const { return texture_.get(); }
22 
24 
25  protected:
26  virtual void Bind() override;
27  virtual void Unbind() override;
28 
29  private:
30  virtual void UpdateViewport() override;
31 
32  unsigned int gl_buffer_;
33  std::unique_ptr<graphic::GLTexture> texture_;
34 };
35 
36 } // namespace graphic
37 } // namespace ugdk
38 
39 #endif // UGDK_GRAPHIC_RENDERTEXTURE_H_
virtual void Unbind() override
Definition: vector2D.h:18
Definition: rendertexture.h:14
Definition: integer2D.h:20
virtual void Bind() override
graphic::GLTexture * texture() const
Definition: rendertexture.h:21
Definition: animation.h:11
Definition: geometry.h:15
void set_projection_matrix(const math::Geometry &)
virtual math::Vector2D size() const override
RenderTexture(std::unique_ptr< graphic::GLTexture > &&texture)
Definition: rendertarget.h:12