]> git.tdb.fi Git - libs/gl.git/blobdiff - source/effects/shadowmap.cpp
Remove deprecated constructors from effects
[libs/gl.git] / source / effects / shadowmap.cpp
index bcdb0c9f39ef6ec24ac5ac3121f8a8b3bd0be64b..f688a6e3a7d4e858c23cf5126908475545bbe712 100644 (file)
@@ -14,29 +14,14 @@ namespace GL {
 
 ShadowMap::ShadowMap(unsigned s, Renderable &r, const Light &l, Renderable &c):
        Effect(r),
+       size(s),
        light(l),
        shadow_caster(c),
-       sampler(Resources::get_global().get<Sampler>("_linear_clamp_shadow.samp"))
+       sampler(Resources::get_global().get<Sampler>("_linear_clamp_shadow.samp")),
+       radius(1),
+       depth_bias(4),
+       rendered(false)
 {
-       init(s);
-}
-
-ShadowMap::ShadowMap(unsigned s, Renderable &r, const Light &l):
-       Effect(r),
-       light(l),
-       shadow_caster(r),
-       sampler(Resources::get_global().get<Sampler>("_linear_clamp_shadow.samp"))
-{
-       init(s);
-}
-
-void ShadowMap::init(unsigned s)
-{
-       size = s;
-       radius = 1;
-       depth_bias = 4;
-       rendered = false;
-
        depth_buf.storage(DEPTH_COMPONENT32F, size, size, 1);
        fbo.set_format((DEPTH_ATTACHMENT,DEPTH_COMPONENT32F));
        fbo.attach(DEPTH_ATTACHMENT, depth_buf, 0);