]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/shadowmap.cpp
Split the Light class into subclasses by light type
[libs/gl.git] / source / effects / shadowmap.cpp
index 49dfa36de0bb636d101900dc78e47ca42f03f723..1b5f531b913c2d339f8e1aee3830775d576aed58 100644 (file)
@@ -1,6 +1,6 @@
 #include <msp/strings/format.h>
+#include "directionallight.h"
 #include "error.h"
-#include "light.h"
 #include "lighting.h"
 #include "renderer.h"
 #include "resources.h"
@@ -38,7 +38,7 @@ ShadowMap::ShadowMap(unsigned w, unsigned h, Renderable &r, const Lighting *l, R
        }
 }
 
-ShadowMap::ShadowMap(unsigned s, Renderable &r, const Light &l, Renderable &c):
+ShadowMap::ShadowMap(unsigned s, Renderable &r, const DirectionalLight &l, Renderable &c):
        ShadowMap(s, s, r, 0, c)
 {
        add_light(l, s);
@@ -48,7 +48,7 @@ ShadowMap::ShadowMap(unsigned w, unsigned h, Renderable &r, const Lighting &l, R
        ShadowMap(w, h, r, &l, c)
 { }
 
-void ShadowMap::add_light(const Light &light, unsigned s)
+void ShadowMap::add_light(const DirectionalLight &light, unsigned s)
 {
        if(!lighting && !lights.empty())
                throw invalid_operation("ShadowMap::add_light");