0032507: Visualization, TKOpenGl - topmost text disappears with Graphic3d_RTM_DEPTH_P...
[occt.git] / src / OpenGl / OpenGl_LayerList.cxx
index 53d616f..d12e38e 100644 (file)
@@ -1219,6 +1219,13 @@ void OpenGl_LayerList::renderTransparent (const Handle(OpenGl_Workspace)&   theW
         }
       }
       aView->DepthPeelingFbos()->DetachDepthTexture (aCtx);
+
+      // Bind the framebuffer for reading depth and writing final color
+      // after DetachDepthTexture() because after the function it's unbinded.
+      if (theReadDrawFbo)
+      {
+        theReadDrawFbo->BindBuffer (aCtx);
+      }
       break;
     }
   }