]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/ambientocclusion.h
Use default member initializers for simple types
[libs/gl.git] / source / effects / ambientocclusion.h
index f186db3dcd073a9577d20d44d68c6bd6f9d8185f..efaa2f378b2be66282648d2855f602fcc1a59071 100644 (file)
@@ -1,17 +1,15 @@
 #ifndef MSP_GL_AMBIENTOCCLUSION_H_
 #define MSP_GL_AMBIENTOCCLUSION_H_
 
-#include "framebuffer.h"
-#include "mesh.h"
 #include "postprocessor.h"
-#include "program.h"
 #include "programdata.h"
 #include "rendertarget.h"
-#include "texture2d.h"
 
 namespace Msp {
 namespace GL {
 
+class Program;
+
 /**
 Implements screen-space ambient occlusion.
 
@@ -28,12 +26,10 @@ public:
                        Loader(Template &);
                };
 
-               unsigned n_samples;
-               float occlusion_radius;
-               float darkness;
-               float edge_depth_threshold;
-
-               Template();
+               unsigned n_samples = 16;
+               float occlusion_radius = 0.5f;
+               float darkness = 1.0f;
+               float edge_depth_threshold = 0.1f;
 
                virtual AmbientOcclusion *create(unsigned, unsigned) const;
        };
@@ -64,6 +60,8 @@ public:
        void set_darkness(float);
 
        virtual void render(Renderer &, const Texture2D &, const Texture2D &);
+
+       virtual void set_debug_name(const std::string &);
 };
 
 } // namespace GL