X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Frender%2Frendertarget.h;h=f13d23d9683a12b2828272125a610570b52c28ca;hp=cb6d6b97280d85c1ca2f252c6ed65b5ca2917377;hb=cd5f37b066352119cf92d53d0001af7ff99be437;hpb=1863f17c5c5563be8492d7f01e5c613a740ea1e9 diff --git a/source/render/rendertarget.h b/source/render/rendertarget.h index cb6d6b97..f13d23d9 100644 --- a/source/render/rendertarget.h +++ b/source/render/rendertarget.h @@ -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 buffers; + std::vector 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 &); };