From: Mikko Rasa Date: Sun, 28 Sep 2014 18:02:28 +0000 (+0300) Subject: Exclude EnvironMap effect itself when creating the map X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=00d3ccedefb1a5efb3d2d4625a2b68446703fbab;p=libs%2Fgl.git Exclude EnvironMap effect itself when creating the map This avoids an unnecessary texture bind/unbind cycle if the EnvironmentMap is contained within its own environment. --- diff --git a/source/environmentmap.cpp b/source/environmentmap.cpp index f61d2c40..ae98719f 100644 --- a/source/environmentmap.cpp +++ b/source/environmentmap.cpp @@ -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();