]> git.tdb.fi Git - libs/gl.git/commitdiff
Remove deprecated constructors from effects
authorMikko Rasa <tdb@tdb.fi>
Mon, 13 Sep 2021 17:13:36 +0000 (20:13 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 13 Sep 2021 17:13:36 +0000 (20:13 +0300)
source/effects/environmentmap.cpp
source/effects/environmentmap.h
source/effects/shadowmap.cpp
source/effects/shadowmap.h

index ced4a1044d2bd4cbe33f388d2299c7fc4025e83e..8770aba5f2e1fcf19a5de76599c0a5f77a7afb71 100644 (file)
@@ -10,18 +10,6 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
-EnvironmentMap::EnvironmentMap(unsigned s, Renderable &r, Renderable &e):
-       Effect(r),
-       environment(e),
-       irradiance_shprog(Resources::get_global().get<Program>("_envmap_irradiance.glsl.shader")),
-       specular_shprog(Resources::get_global().get<Program>("_envmap_specular.glsl.shader")),
-       fullscreen_mesh(Resources::get_global().get<Mesh>("_fullscreen_quad.mesh")),
-       sampler(Resources::get_global().get<Sampler>("_linear_clamp.samp")),
-       mip_sampler(Resources::get_global().get<Sampler>("_mip_clamp.samp"))
-{
-       init(s, RGB8, 1);
-}
-
 EnvironmentMap::EnvironmentMap(unsigned s, PixelFormat f, Renderable &r, Renderable &e):
        Effect(r),
        environment(e),
index e02687b71184c37b3b11c0a30c8f1b75862e3774..9c8447f6173f988d2f952f91d08b4cb4d52846b7 100644 (file)
@@ -55,7 +55,6 @@ private:
        unsigned update_delay;
 
 public:
-       EnvironmentMap(unsigned size, Renderable &rend, Renderable &env);
        EnvironmentMap(unsigned size, PixelFormat, Renderable &rend, Renderable &env);
        EnvironmentMap(unsigned size, PixelFormat, unsigned, Renderable &rend, Renderable &env);
 private:
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);
index 67f2cf6c30a0b1b264759b0090265b89cec7a5b6..81563a72887acec2fc848d4c954776f51fa98165 100644 (file)
@@ -41,11 +41,7 @@ private:
 
 public:
        ShadowMap(unsigned, Renderable &, const Light &, Renderable &);
-       DEPRECATED ShadowMap(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. */