UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
rendertarget.h
Go to the documentation of this file.
1 #ifndef UGDK_GRAPHIC_RENDERTARGET_H_
2 #define UGDK_GRAPHIC_RENDERTARGET_H_
3 
4 #include <ugdk/graphic.h>
5 #include <ugdk/math/geometry.h>
6 #include <ugdk/math/vector2D.h>
7 #include <ugdk/structure/color.h>
8 
9 namespace ugdk {
10 namespace graphic {
11 
12 class RenderTarget {
13  public:
14  virtual ~RenderTarget();
15 
16  bool IsActive() const;
17  const math::Geometry& projection_matrix() const;
18  virtual math::Vector2D size() const = 0;
19 
21  void Clear(structure::Color);
22 
23  protected:
24  RenderTarget();
25  virtual void Bind();
26  virtual void Unbind();
27 
29 
30  private:
31  virtual void UpdateViewport() = 0;
32 
33  bool is_bound_;
34 
35  friend class ::ugdk::graphic::Canvas;
36 };
37 
38 } // namespace graphic
39 } // namespace ugdk
40 
41 #endif // UGDK_GRAPHIC_RENDERTARGET_H_
virtual math::Vector2D size() const =0
Definition: vector2D.h:18
const math::Geometry & projection_matrix() const
Definition: color.h:9
Definition: animation.h:11
math::Geometry projection_matrix_
Definition: rendertarget.h:28
Definition: geometry.h:15
void Clear(structure::Color)
Definition: rendertarget.h:12