X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Feffects%2Fshadowmap.h;fp=source%2Feffects%2Fshadowmap.h;h=7dab9eb965a6e9266156437741bc40854133c37e;hb=9a63244c1342337915c4610401a24c09fa72cc3d;hp=e142fc8cafdd56023459035f53d48e73205c997b;hpb=73bef37da97b6da0b99227f63235cb52c4e56c44;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