diff --git a/modules/gfx/src/gfx_object.cc b/modules/gfx/src/gfx_object.cc index 43ea74d7655b2e63ad80653b7b7755470353cec1..90c82ca1cdfec297a7d6ee077e00076d7522668f 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 5840c68a11ef21c90b3b4ed5376a984e0436eafe..ad86180aa623514451d426897a11e0fe4597431d 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(); }