]> git.tdb.fi Git - libs/gl.git/blobdiff - source/bloom.h
Use RenderTarget objects to manage FBOs in postprocessors
[libs/gl.git] / source / bloom.h
index 957febb20923670ebe53bd99aeb6b31de4faa059..73232d16e4058534c5ee88c02c43a8ca5dd941c2 100644 (file)
@@ -8,6 +8,7 @@
 #include "texturing.h"
 #include "program.h"
 #include "programdata.h"
+#include "rendertarget.h"
 
 namespace Msp {
 namespace GL {
@@ -23,8 +24,7 @@ a blur filter.
 class Bloom: public PostProcessor
 {
 private:
-       Framebuffer fbo[2];
-       Texture2D tex[2];
+       RenderTarget *target[2];
        Program blur_shader;
        ProgramData blur_shdata_common;
        ProgramData blur_shdata[2];
@@ -35,6 +35,7 @@ private:
 
 public:
        Bloom(unsigned, unsigned);
+       ~Bloom();
 
        /** Sets the σ value of the gaussian blur.  Values much larger than 4.0 are
        likely to cause artifacts. */