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