X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Frender%2Frendertarget.h;h=f13d23d9683a12b2828272125a610570b52c28ca;hp=7d796a3cefe80540a409f5e6b80a6535aefa87f0;hb=cd5f37b066352119cf92d53d0001af7ff99be437;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266 diff --git a/source/render/rendertarget.h b/source/render/rendertarget.h index 7d796a3c..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,10 @@ 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 &); }; } // namespace GL