From d895da0ab78b60fb083cb9846ad1a4b4eebde69c Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 1 Nov 2014 02:25:49 +0200 Subject: [PATCH] Use the same Renderer to render all faces of EnvironmentMap --- source/environmentmap.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/environmentmap.cpp b/source/environmentmap.cpp index ae98719f..ec406d15 100644 --- a/source/environmentmap.cpp +++ b/source/environmentmap.cpp @@ -39,6 +39,7 @@ void EnvironmentMap::setup_frame() const renderable.setup_frame(); environment.setup_frame(); + Renderer env_renderer(0); const Matrix *matrix = renderable.get_matrix(); Vector3 position = (*matrix)*Vector3(); camera.set_position(position); @@ -49,7 +50,7 @@ void EnvironmentMap::setup_frame() const fbo[i].clear(COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT); camera.set_look_direction(env_tex.get_face_direction(face)); camera.set_up_direction(env_tex.get_t_direction(face)); - Renderer env_renderer(&camera); + env_renderer.begin(&camera); env_renderer.exclude(renderable); env_renderer.exclude(*this); env_renderer.render(environment); -- 2.45.2