]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/ambientocclusion.h
Store the ambient occlusion rotate lookup texture in resources
[libs/gl.git] / source / effects / ambientocclusion.h
index 6c2c5d7eea938daa6be0e6e5ce2387dd2a361660..61d4d4f3e44a48daf94468d684d26f14e4b19ba5 100644 (file)
@@ -8,7 +8,6 @@
 #include "programdata.h"
 #include "rendertarget.h"
 #include "texture2d.h"
-#include "texturing.h"
 
 namespace Msp {
 namespace GL {
@@ -40,20 +39,21 @@ public:
        };
 
 private:
-       Texture2D rotate_lookup;
+       const Texture2D &rotate_lookup;
        RenderTarget occlude_target;
-       Texturing texturing;
-       Program occlude_shader;
-       Program combine_shader;
+       const Program &occlude_shader;
+       const Program &combine_shader;
        mutable ProgramData shdata;
-       RefPtr<Mesh> quad;
-       RefPtr<Sampler> linear_sampler;
-       RefPtr<Sampler> nearest_sampler;
+       const Mesh &quad;
+       const Sampler &linear_sampler;
+       const Sampler &nearest_clamp_sampler;
+       const Sampler &nearest_sampler;
 
 public:
        AmbientOcclusion(unsigned, unsigned, float = 1.0f);
 
 private:
+       static const Texture2D &get_or_create_rotate_lookup();
        static float random(unsigned &);
 
 public: