]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/shadowmap.h
Load various built-in things through Resources
[libs/gl.git] / source / effects / shadowmap.h
index e142fc8cafdd56023459035f53d48e73205c997b..7dab9eb965a6e9266156437741bc40854133c37e 100644 (file)
@@ -11,6 +11,7 @@ namespace Msp {
 namespace GL {
 
 class Light;
+class Resources;
 class Scene;
 
 /**
@@ -27,17 +28,15 @@ private:
        Framebuffer fbo;
        Matrix shadow_matrix;
        Texture2D depth_buf;
-       RefPtr<Sampler> sampler;
+       const Sampler &sampler;
        Vector3 target;
        float radius;
        float depth_bias;
        mutable ProgramData shdata;
        bool rendered;
 
-       static WeakPtr<Sampler> shadow_sampler;
-
 public:
-       ShadowMap(unsigned, Renderable &, const Light &);
+       ShadowMap(Resources &, unsigned, Renderable &, const Light &);
 
        /** Sets the ShadowMap target point and radius.  The transformation matrix is
        computed so that a sphere with the specified parameters will be completely