]> git.tdb.fi Git - libs/gl.git/blob - source/render/rendertarget.h
Add support for integer vertex attributes
[libs/gl.git] / source / render / rendertarget.h
1 #ifndef RENDERTARGET_H_
2 #define RENDERTARGET_H_
3
4 #include "framebuffer.h"
5
6 namespace Msp {
7 namespace GL {
8
9 class Texture;
10 class Texture2D;
11
12 class RenderTarget
13 {
14 private:
15         unsigned width;
16         unsigned height;
17         std::vector<Texture *> textures;
18         Framebuffer fbo;
19
20 public:
21         RenderTarget(unsigned, unsigned, const FrameFormat & = (COLOR_ATTACHMENT, DEPTH_ATTACHMENT));
22 private:
23         RenderTarget(const RenderTarget &);
24         RenderTarget &operator=(const RenderTarget &);
25 public:
26         ~RenderTarget();
27
28         unsigned get_width() const { return width; }
29         unsigned get_height() const { return height; }
30         const FrameFormat &get_format() const { return fbo.get_format(); }
31         Framebuffer &get_framebuffer() { return fbo; }
32         const Texture2D &get_target_texture(unsigned) const;
33         const Texture2D &get_target_texture(FrameAttachment) const;
34
35         void set_debug_name(const std::string &);
36 };
37
38 } // namespace GL
39 } // namespace Msp
40
41 #endif