From 8964407f07993262922cd84d756d63ccbb5620f5 Mon Sep 17 00:00:00 2001 From: Ansgar Philippsen <ansgar.philippsen@gmail.com> Date: Fri, 28 Dec 2012 14:30:08 -0500 Subject: [PATCH] fixed broken bg transparency export --- modules/gfx/src/gfx_object.cc | 2 ++ modules/gfx/src/scene.cc | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/gfx/src/gfx_object.cc b/modules/gfx/src/gfx_object.cc index 43ea74d76..90c82ca1c 100644 --- a/modules/gfx/src/gfx_object.cc +++ b/modules/gfx/src/gfx_object.cc @@ -720,6 +720,7 @@ void GfxObj::Debug(unsigned int flags) void GfxObj::render_depth_only() { glPushAttrib(GL_ALL_ATTRIB_BITS); + glPushClientAttrib(GL_ALL_ATTRIB_BITS); glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); glDisable(GL_LIGHTING); glDisable(GL_COLOR_MATERIAL); @@ -735,6 +736,7 @@ void GfxObj::render_depth_only() CustomRenderGL(STANDARD_RENDER_PASS); CustomRenderGL(TRANSPARENT_RENDER_PASS); glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE); + glPopClientAttrib(); glPopAttrib(); } diff --git a/modules/gfx/src/scene.cc b/modules/gfx/src/scene.cc index 5840c68a1..ad86180aa 100644 --- a/modules/gfx/src/scene.cc +++ b/modules/gfx/src/scene.cc @@ -438,7 +438,8 @@ void Scene::InitGL(bool full) glClearDepth(1.0); // background - glClearColor(background_.Red(),background_.Green(),background_.Blue(),background_.Alpha()); + //glClearColor(background_.Red(),background_.Green(),background_.Blue(),background_.Alpha()); + glClearColor(background_.Red(),background_.Green(),background_.Blue(),0.0); fog_color_=background_; // polygon orientation setting @@ -582,7 +583,8 @@ void Scene::SetBackground(const Color& c) background_=c; bg_mode_=0; if(gl_init_) { - glClearColor(c.Red(),c.Green(),c.Blue(),c.Alpha()); + //glClearColor(c.Red(),c.Green(),c.Blue(),c.Alpha()); + glClearColor(c.Red(),c.Green(),c.Blue(),0.0); SetFogColor(c); RequestRedraw(); } -- GitLab