X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Feffects%2Fshadowmap.h;h=6c4e1e501713d84aa393652b8eefb32912a3a0ec;hp=611f56f51040a2204055e29f37d0e67a68d48b7c;hb=cdedbb34eff07f188c536167592958e315d53a9b;hpb=867c4e8c34fe24146f4f8cf6bd0b27a6d99aa1a2 diff --git a/source/effects/shadowmap.h b/source/effects/shadowmap.h index 611f56f5..6c4e1e50 100644 --- a/source/effects/shadowmap.h +++ b/source/effects/shadowmap.h @@ -30,13 +30,13 @@ private: unsigned index; Rect region; Camera shadow_camera; + Renderable *shadow_caster; }; unsigned width; unsigned height; const Lighting *lighting; std::vector lights; - Renderable &shadow_caster; Framebuffer fbo; Texture2D depth_buf; const Sampler &sampler; @@ -48,12 +48,12 @@ private: bool rendered = false; std::string debug_name; - ShadowMap(unsigned, unsigned, Renderable &, const Lighting *, Renderable &); + ShadowMap(unsigned, unsigned, Renderable &, const Lighting *); public: ShadowMap(unsigned, Renderable &, const DirectionalLight &, Renderable &); - ShadowMap(unsigned, unsigned, Renderable &, const Lighting &, Renderable &); + ShadowMap(unsigned, unsigned, Renderable &, const Lighting &); - void add_light(const DirectionalLight &, unsigned); + void add_light(const DirectionalLight &, unsigned, Renderable &); /** Sets the ShadowMap target point and radius. The transformation matrix is computed so that a sphere with the specified parameters will be completely