From: Mikko Rasa Date: Fri, 24 May 2019 17:49:41 +0000 (+0300) Subject: Add OffscreenView class X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4691b76467eadabfb0a7e810b12fe858a36ad519;p=libs%2Fgl.git Add OffscreenView class This is a fairly thin wrapper around RenderTarget, mostly useful as an abstraction. --- diff --git a/source/offscreenview.cpp b/source/offscreenview.cpp new file mode 100644 index 00000000..6d0d88b0 --- /dev/null +++ b/source/offscreenview.cpp @@ -0,0 +1,16 @@ +#include "offscreenview.h" +#include "rendertarget.h" + +namespace Msp { +namespace GL { + +OffscreenView::OffscreenView(Framebuffer &t): + View(t) +{ } + +OffscreenView::OffscreenView(RenderTarget &t): + View(t.get_framebuffer()) +{ } + +} // namespace GL +} // namespace Msp diff --git a/source/offscreenview.h b/source/offscreenview.h new file mode 100644 index 00000000..3de47f10 --- /dev/null +++ b/source/offscreenview.h @@ -0,0 +1,22 @@ +#ifndef MSP_GL_OFFSCREENVIEW_H_ +#define MSP_GL_OFFSCREENVIEW_H_ + +#include "view.h" + +namespace Msp { +namespace GL { + +class Framebuffer; +class RenderTarget; + +class OffscreenView: public View +{ +public: + OffscreenView(Framebuffer &); + OffscreenView(RenderTarget &); +}; + +} // namespace GL +} // namespace Msp + +#endif