1 #ifndef MSP_GL_POSTPROCESSOR_H_
2 #define MSP_GL_POSTPROCESSOR_H_
4 #include <msp/datafile/objectloader.h>
15 Base class for post-processing effects. Post-processors receive the contents
16 of the entire framebuffer as a texture and render it back, altering it in the
24 class Loader: public Msp::DataFile::ObjectLoader<Template>
30 unsigned size_divisor;
33 virtual ~Template() { }
35 virtual PostProcessor *create(unsigned, unsigned) const = 0;
41 virtual ~PostProcessor() { }
43 /// Renders the effect.
44 virtual void render(const Texture2D &, const Texture2D &) { }
46 virtual void render(Renderer &, const Texture2D &, const Texture2D &);
49 /** Returns a mesh consisting of a single quad, covering the entire screen.
50 The vertices are in normalized device coordinates. */
51 static const Mesh &get_fullscreen_quad();
54 static const Mesh &create_fullscreen_quad();