]> git.tdb.fi Git - libs/gl.git/blobdiff - source/shadowmap.h
Use the frame notifications in ShadowMap
[libs/gl.git] / source / shadowmap.h
index 986e0d96d039936b56758495da9a84954c007074..aeabaeb19a89895c1ba07b5f3666d239d118c6b2 100644 (file)
@@ -25,12 +25,14 @@ private:
        unsigned size;
        const Light &light;
        mutable Framebuffer fbo;
+       mutable Matrix light_matrix;
        unsigned unit;
        Texture2D depth_buf;
        Vector3 target;
        float radius;
        float depth_bias;
        ProgramData shdata;
+       mutable bool rendered;
 
 public:
        ShadowMap(unsigned, const Renderable &, const Light &);
@@ -56,6 +58,9 @@ public:
        The default is texture unit 3. */
        void set_texture_unit(unsigned);
 
+       virtual void setup_frame() const;
+       virtual void finish_frame() const;
+
        virtual void render(Renderer &, const Tag &) const;
 };