mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
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
This commit is contained in:
parent
f3a1c0cb60
commit
f55ba97f90
@ -1105,6 +1105,10 @@ void OpenGl_View::renderStructs (Graphic3d_Camera::Projection theProjection,
|
|||||||
aCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, 0);
|
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
|
// Ray-tracing polygonal primitive arrays
|
||||||
raytrace (aSizeX, aSizeY, theProjection, theReadDrawFbo, aCtx);
|
raytrace (aSizeX, aSizeY, theProjection, theReadDrawFbo, aCtx);
|
||||||
|
|
||||||
|
29
tests/bugs/vis/bug27083
Normal file
29
tests/bugs/vis/bug27083
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user