0026085: Shape is not displayed in wireframe mode with activated RayTracing
authordbp <dbp@opencascade.com>
Thu, 16 Apr 2015 08:43:34 +0000 (11:43 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 16 Apr 2015 11:25:55 +0000 (14:25 +0300)
src/OpenGl/OpenGl_View_2.cxx

index 4d258ad..db638b5 100644 (file)
@@ -596,23 +596,21 @@ void OpenGl_View::RenderStructs (const Handle(OpenGl_Workspace)& theWorkspace,
     toRenderGL = !initRaytraceResources (theCView, aCtx) ||
       !updateRaytraceGeometry (OpenGl_GUM_CHECK, theWorkspace->ActiveViewId(), aCtx);
 
-    OpenGl_FrameBuffer* anOutputFBO = NULL;
+    toRenderGL |= !myIsRaytraceDataValid; // if no ray-trace data use OpenGL
 
-    if (theWorkspace->ResultFBO()->IsValid())
+    if (!toRenderGL)
     {
-      anOutputFBO = theWorkspace->ResultFBO().operator->();
-    }
-    else if (theCView.ptrFBO != NULL)
-    {
-      anOutputFBO = (OpenGl_FrameBuffer* )theCView.ptrFBO;
-    }
-    else
-    {
-      //toRenderGL = Standard_True; // failed to get valid FBO
-    }
+      OpenGl_FrameBuffer* anOutputFBO = NULL;
+
+      if (theWorkspace->ResultFBO()->IsValid())
+      {
+        anOutputFBO = theWorkspace->ResultFBO().operator->();
+      }
+      else if (theCView.ptrFBO != NULL)
+      {
+        anOutputFBO = (OpenGl_FrameBuffer* )theCView.ptrFBO;
+      }
 
-    if (!toRenderGL && myIsRaytraceDataValid)
-    {
       const Standard_Integer aSizeX = anOutputFBO != NULL ?
         anOutputFBO->GetVPSizeX() : theWorkspace->Width();
       const Standard_Integer aSizeY = anOutputFBO != NULL ?