From 5682a029348ff889e77b49b1f18530e5e43868b7 Mon Sep 17 00:00:00 2001 From: dbp Date: Thu, 16 Apr 2015 11:43:34 +0300 Subject: [PATCH] 0026085: Shape is not displayed in wireframe mode with activated RayTracing --- src/OpenGl/OpenGl_View_2.cxx | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/OpenGl/OpenGl_View_2.cxx b/src/OpenGl/OpenGl_View_2.cxx index 4d258adfd5..db638b5a38 100644 --- a/src/OpenGl/OpenGl_View_2.cxx +++ b/src/OpenGl/OpenGl_View_2.cxx @@ -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 ? -- 2.20.1