X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Feffects%2Fshadowmap.h;h=5d8bf5095287423827e71f32b988a22811d1777e;hb=18449fc11c620be7b3115f28a5edfb57eb5985ef;hp=9fc0f4497ac1f160d18062c54bcdf616f80dd99c;hpb=233dff2a6c552e08da832496aecd88ef4f8948f1;p=libs%2Fgl.git diff --git a/source/effects/shadowmap.h b/source/effects/shadowmap.h index 9fc0f449..5d8bf509 100644 --- a/source/effects/shadowmap.h +++ b/source/effects/shadowmap.h @@ -1,6 +1,7 @@ #ifndef MSP_GL_SHADOWMAP_H_ #define MSP_GL_SHADOWMAP_H_ +#include "camera.h" #include "effect.h" #include "framebuffer.h" #include "programdata.h" @@ -24,7 +25,9 @@ class ShadowMap: public Effect private: unsigned size; const Light &light; + Renderable &shadow_caster; Framebuffer fbo; + Camera shadow_camera; Matrix shadow_matrix; Texture2D depth_buf; const Sampler &sampler; @@ -35,8 +38,12 @@ private: bool rendered; public: - ShadowMap(Resources &, unsigned, Renderable &, const Light &); + ShadowMap(Resources &, unsigned, Renderable &, const Light &, Renderable &); + DEPRECATED ShadowMap(Resources &, unsigned, Renderable &, const Light &); +private: + void init(unsigned); +public: /** Sets the ShadowMap target point and radius. The transformation matrix is computed so that a sphere with the specified parameters will be completely covered by the ShadowMap. */