1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-06 10:36:12 +03:00
occt/tests/bugs/vis/bug26149
isz eae454e330 0026149: Visualization - depth buffer should not be written within Z-layers without Graphic3d_ZLayerDepthWrite flag
OpenGl_Workspace::updateMaterial() - do not activate writing into Depth buffer without Graphic3d_ZLayerDepthWrite flag.
Add method OpenGl_Workspace::UseDepthWrite() to track glDepthMask() state.

Drop the following outdated API methods conflicting with Z-layers API:
- V3d_View::EnableDepthTest(), V3d_View::IsDepthTestEnabled()
- Visual3d_View::ZBufferIsActivated(), Visual3d_View::SetZBufferActivity(), Visual3d_View::EnableDepthTest(), Visual3d_View::IsDepthTestEnabled()
- Graphic3d_GraphicDriver::SetDepthTestEnabled(), Graphic3d_GraphicDriver::IsDepthTestEnabled()

Activate Z-buffer by default, and manage it state only by Z-layer flags.
2015-06-04 14:42:09 +03:00

42 lines
1.4 KiB
Plaintext

puts "==========="
puts "0026149: Visualization - depth buffer should not be written within Z-layers without Graphic3d_ZLayerDepthWrite flag"
puts "Check that objects drawn in Graphic3d_ZLayerId_BotOSD layer do not overlap objects in Graphic3d_ZLayerId_Default layer."
puts "==========="
pload MODELING VISUALIZATION
vinit View1
vclear
vaxo
text2brep tcc "Center" Times-Roman 30
vdisplay tcc -2d -underlay
polyline lcc -50 -50 0 -50 50 0 50 50 0 50 0 0 0 -50 0 -50 -50 0
vdisplay lcc -2d -underlay
text2brep tbl "Bottom-Left" Times-Roman 30
vdisplay tbl -2d -trsfPersPos -1 -1 5 -underlay
polyline lbl 0 0 0 0 100 0 100 100 0 100 50 0 50 0 0 0 0 0
vdisplay lbl -2d -trsfPersPos -1 -1 3 -underlay
text2brep ttl "Top-Left" Times-Roman 30 x=-27 y=0
vdisplay ttl -2d -trsfPersPos -1 1 30 -underlay
polyline ltl 0 -100 0 0 0 0 100 0 0 100 -50 0 50 -100 0 0 -100 0
vdisplay ltl -2d -trsfPersPos -1 1 3 -underlay
text2brep ttr "Top-Right" Times-Roman 30 x=-100 y=0
vdisplay ttr -2d -trsfPersPos 1 1 30 -underlay
polyline ltr -100 -100 0 -100 0 0 0 0 0 0 -50 0 -50 -100 0 -100 -100 0
vdisplay ltr -2d -trsfPersPos 1 1 3 -underlay
text2brep tbr "Bottom-Right" Times-Roman 30 x=-165 y=0
vdisplay tbr -2d -trsfPersPos 1 -1 5 -underlay
polyline lbr -100 0 0 -100 100 0 0 100 0 0 50 0 -50 0 0 -100 0 0
vdisplay lbr -2d -trsfPersPos 1 -1 3 -underlay
box b 1 2 3
vdisplay b
vfit
vsetdispmode b 1
vdump ${imagedir}/${casename}.png