]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/rendertarget.h
Remove RenderBuffer and always use textures as framebuffer attachments
[libs/gl.git] / source / render / rendertarget.h
index cb6d6b97280d85c1ca2f252c6ed65b5ca2917377..f13d23d9683a12b2828272125a610570b52c28ca 100644 (file)
@@ -2,11 +2,13 @@
 #define RENDERTARGET_H_
 
 #include "framebuffer.h"
-#include "texture2d.h"
 
 namespace Msp {
 namespace GL {
 
+class Texture;
+class Texture2D;
+
 enum RenderOutput
 {
        RENDER_COLOR = 0|3,
@@ -49,17 +51,11 @@ PixelFormat get_output_pixelformat(unsigned char);
 class RenderTarget
 {
 private:
-       union TargetBuffer
-       {
-               Texture2D *texture;
-               Renderbuffer *buffer;
-       };
-
        unsigned width;
        unsigned height;
        unsigned samples;
        RenderTargetFormat format;
-       std::vector<TargetBuffer> buffers;
+       std::vector<Texture *> textures;
        Framebuffer fbo;
 
 public:
@@ -77,10 +73,8 @@ public:
        unsigned get_height() const { return height; }
        const RenderTargetFormat &get_format() const { return format; }
        Framebuffer &get_framebuffer() { return fbo; }
-       void set_texture_filter(TextureFilter);
        const Texture2D &get_target_texture(unsigned) const;
        const Texture2D &get_target_texture(RenderOutput) const;
-       void blit_from(const RenderTarget &);
 
        void set_debug_name(const std::string &);
 };