]> 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 030e45775f19898ef1e29914000e7e2ac8d1a660..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: