]> git.tdb.fi Git - libs/gl.git/commitdiff
Exclude EnvironMap effect itself when creating the map
authorMikko Rasa <tdb@tdb.fi>
Sun, 28 Sep 2014 18:02:28 +0000 (21:02 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 29 Sep 2014 15:10:04 +0000 (18:10 +0300)
This avoids an unnecessary texture bind/unbind cycle if the EnvironmentMap
is contained within its own environment.

source/environmentmap.cpp

index f61d2c40ed9a45507fcf5e87f1db4adf9ce54181..ae98719f16c623f81cc0045bcd4d040f82884129 100644 (file)
@@ -51,6 +51,7 @@ void EnvironmentMap::setup_frame() const
                camera.set_up_direction(env_tex.get_t_direction(face));
                Renderer env_renderer(&camera);
                env_renderer.exclude(renderable);
+               env_renderer.exclude(*this);
                env_renderer.render(environment);
        }
        Framebuffer::unbind();