X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Feffects%2Fshadowmap.h;h=7dab9eb965a6e9266156437741bc40854133c37e;hb=9a63244;hp=e142fc8cafdd56023459035f53d48e73205c997b;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266;p=libs%2Fgl.git diff --git a/source/effects/shadowmap.h b/source/effects/shadowmap.h index e142fc8c..7dab9eb9 100644 --- a/source/effects/shadowmap.h +++ b/source/effects/shadowmap.h @@ -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; + const Sampler &sampler; Vector3 target; float radius; float depth_bias; mutable ProgramData shdata; bool rendered; - static WeakPtr 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