From f55ba97f90171ce3138b08f1a615a2598f0fe9d1 Mon Sep 17 00:00:00 2001 From: vpa Date: Wed, 20 Jan 2016 22:11:02 +0300 Subject: [PATCH] 0027083: Visualization, Ray Tracing - shape with visible face boundaries disappears after turning the ray-tracing on - default state of aspects is now restored to prevent backface culling which is not supported by ray-tracing yet; - added test case for issue #27083 --- src/OpenGl/OpenGl_View_Redraw.cxx | 4 ++++ tests/bugs/vis/bug27083 | 29 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/bugs/vis/bug27083 diff --git a/src/OpenGl/OpenGl_View_Redraw.cxx b/src/OpenGl/OpenGl_View_Redraw.cxx index aeabc27612..1cb1cdf92e 100644 --- a/src/OpenGl/OpenGl_View_Redraw.cxx +++ b/src/OpenGl/OpenGl_View_Redraw.cxx @@ -1105,6 +1105,10 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection, aCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, 0); } + // Reset OpenGl aspects state to default to avoid enabling of + // backface culling which is not supported in ray-tracing. + myWorkspace->ResetAppliedAspect(); + // Ray-tracing polygonal primitive arrays raytrace (aSizeX, aSizeY, theProjection, theReadDrawFbo, aCtx); diff --git a/tests/bugs/vis/bug27083 b/tests/bugs/vis/bug27083 new file mode 100644 index 0000000000..9311674ed1 --- /dev/null +++ b/tests/bugs/vis/bug27083 @@ -0,0 +1,29 @@ +puts "========" +puts "OCC27083" +puts "========" +puts "" +################################################################## +puts "Visualization, Ray Tracing - shape with visible face boundaries disappears after turning the ray-tracing on" +################################################################## + +pload VISUALIZATION MODELING + +box b 1 1 1 + +vinit + +vdisplay b +vfit +vsetdispmode 1 +vshowfaceboundary b 1 255 0 0 3 +vraytrace 1 + +if {[vreadpixel 295 255 name] != "GOLDENROD4 0"} { + puts "ERROR: the box with boundary aspect set is not shown in ray-tracing mode!" +} + +if {[vreadpixel 105 58 name] != "RED 0"} { + puts "ERROR: the box's boundaries are not shown in ray-tracing mode!" +} + +vdump $imagedir/${casename}.png