1 #ifndef RENDERTARGET_H_
2 #define RENDERTARGET_H_
4 #include "framebuffer.h"
13 Wraps a Framebuffer and its attachments for easier management.
15 All attachments will be created as 2D or 2D multisample textures, depending on
16 the sample count of the format.
23 std::vector<Texture *> textures;
27 RenderTarget(unsigned, unsigned, const FrameFormat & = (COLOR_ATTACHMENT, DEPTH_ATTACHMENT));
29 RenderTarget(const RenderTarget &);
30 RenderTarget &operator=(const RenderTarget &);
34 unsigned get_width() const { return width; }
35 unsigned get_height() const { return height; }
36 const FrameFormat &get_format() const { return fbo.get_format(); }
37 Framebuffer &get_framebuffer() { return fbo; }
38 const Texture2D &get_target_texture(unsigned) const;
39 const Texture2D &get_target_texture(FrameAttachment) const;
41 void set_debug_name(const std::string &);