#ifndef MSP_GL_SHADOWMAP_H_
#define MSP_GL_SHADOWMAP_H_
+#include "camera.h"
#include "effect.h"
#include "framebuffer.h"
#include "programdata.h"
private:
unsigned size;
const Light &light;
+ Renderable &shadow_caster;
Framebuffer fbo;
+ Camera shadow_camera;
Matrix shadow_matrix;
Texture2D depth_buf;
const Sampler &sampler;
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. */
virtual void setup_frame(Renderer &);
virtual void finish_frame();
- virtual void render(Renderer &, const Tag & = Tag()) const;
+ virtual void render(Renderer &, Tag = Tag()) const;
};
} // namespace GL