From a983f0c0a40c664d8dce4c63f0f3fdc6a3d26f78 Mon Sep 17 00:00:00 2001
From: Ansgar Philippsen <ansgar.philippsen@gmail.com>
Date: Tue, 26 Jul 2011 12:25:37 -0400
Subject: [PATCH] fixed offscreen export bugs introduced in
 5533ed059b8af4d2253557c82

---
 modules/gfx/src/scene.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/gfx/src/scene.cc b/modules/gfx/src/scene.cc
index 8b9911107..7b7ddce24 100644
--- a/modules/gfx/src/scene.cc
+++ b/modules/gfx/src/scene.cc
@@ -355,7 +355,8 @@ void Scene::InitGL(bool full)
   glClearDepth(1.0);
 
   // background
-  SetBackground(background_);
+  glClearColor(background_.Red(),background_.Green(),background_.Blue(),background_.Alpha());
+  fog_color_=background_;
 
   // polygon orientation setting
   glFrontFace(GL_CCW);
@@ -459,6 +460,8 @@ void Scene::InitGL(bool full)
 
   LOG_DEBUG("Scene: gl init done");
   gl_init_=true;
+  
+  if(!def_shading_mode_.empty()) SetShadingMode(def_shading_mode_);
 }
 
 void Scene::RequestRedraw()
-- 
GitLab