MantisBT - Open CASCADE
View Issue Details
0028127Open CASCADE[OCCT] OCCT:Visualizationpublic2016-11-18 15:392016-12-09 16:39
kgv 
apn 
normalminor 
closedfixed 
WindowsVC++ 201064 bit
[OCCT] 6.8.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
bugs vis bug28127
0028127: Visualization - transparent object breaks Z-Layer depth buffer clear
If last object in ZLayer is semitransparent, next ZLayer is drawn without depth buffer cleared.

The reason is because *OpenGl_Workspace::updateMaterial()* disables depth writes by *glDepthMask(GL_FALSE)* and following *glClear(GL_DEPTH_BUFFER_BIT)* in *OpenGl_Layer::Render()* has no effect.
pload MODELING VISUALIZATION
box r 0 0   0 1 0.1 1
box g 0 0.2 0 1 0.1 1
box b 0 0.4 0 1 0.1 1

vclear
vinit View1
vdisplay -noupdate -dispMode 1 -top r g b
vsetcolor -noupdate r RED
vsetcolor -noupdate g GREEN
vsetcolor -noupdate b BLUE1
vfit

vdisplay -topmost g
vzbufftrihedron -on -position left_upper
# OK - trihedron and green box are drawn topmost as expected

vsettransparency b 0.5
# KO - trihedron and green box are overlapped by red box

if { [vreadpixel 150 150 rgb name] != "GREEN3" } { puts "Error: wrong color - GREEN box 
should overlap RED one" }
if { [vreadpixel  84  64 rgb name] == "RED3"   } { puts "Error: wrong color - Trihedron 
should overlap RED box" }

No tags attached.
related to 0027366closed bugmaster Community Z-Layer: Strange highlight behaviour 
related to 0027818closed kgv Open CASCADE Visualization - provide an interface to define highlight presentation properties 
png depthclear_notransp_OK.png (4,993) 2016-11-18 15:41
https://tracker.dev.opencascade.org/
png depthclear_transp_KO.png (4,178) 2016-11-18 15:41
https://tracker.dev.opencascade.org/
Issue History
2016-11-18 15:39kgvNew Issue
2016-11-18 15:39kgvAssigned To => kgv
2016-11-18 15:41kgvFile Added: depthclear_notransp_OK.png
2016-11-18 15:41kgvFile Added: depthclear_transp_KO.png
2016-11-18 15:45kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15375#r15375
2016-11-18 16:02gitNote Added: 0060541
2016-11-18 16:03kgvNote Added: 0060542
2016-11-18 16:03kgvAssigned Tokgv => san
2016-11-18 16:03kgvStatusnew => resolved
2016-11-18 16:03kgvTarget Version7.2.0 => 7.1.0
2016-11-18 16:05kgvProduct Version7.0.0 => 6.8.0
2016-11-18 16:07gitNote Added: 0060543
2016-11-19 08:58kgvRelationship addedrelated to 0027366
2016-11-19 08:58kgvRelationship addedrelated to 0027818
2016-11-21 13:36sanNote Added: 0060612
2016-11-21 13:36sanAssigned Tosan => bugmaster
2016-11-21 13:36sanStatusresolved => reviewed
2016-11-21 14:24gitNote Added: 0060621
2016-11-21 14:43mkvAssigned Tobugmaster => mkv
2016-11-22 12:10mkvNote Added: 0060670
2016-11-22 12:11mkvNote Added: 0060671
2016-11-22 12:11mkvNote Added: 0060672
2016-11-22 12:11mkvAssigned Tomkv => bugmaster
2016-11-22 12:11mkvStatusreviewed => tested
2016-11-22 12:12mkvTest case number => bugs vis bug28127
2016-11-24 15:52apnChangeset attached => occt master b3eab8ef
2016-11-24 15:52apnAssigned Tobugmaster => apn
2016-11-24 15:52apnStatustested => verified
2016-11-24 15:52apnResolutionopen => fixed
2016-12-07 11:31gitNote Added: 0061301
2016-12-09 16:29aivStatusverified => closed
2016-12-09 16:39aivFixed in Version => 7.1.0

Notes
(0060541)
git   
2016-11-18 16:02   
Branch CR28127 has been created by kgv.

SHA-1: 4e7212def807cae20a5fd7d89f260d384f6e4d2b


Detailed log of new commits:

Author: kgv
Date: Fri Nov 18 16:00:59 2016 +0300

    0028127: Visualization - transparent object breaks Z-Layer depth buffer clear
(0060542)
kgv   
2016-11-18 16:03   
Patch is ready for review.
(0060543)
git   
2016-11-18 16:07   
Branch CR28127 has been updated forcibly by kgv.

SHA-1: efbdca3c025f535eebed1beb79f0a9a6b4191f55
(0060612)
san   
2016-11-21 13:36   
Branch CR28127 reviewed without remarks, ready for testing.
(0060621)
git   
2016-11-21 14:24   
Branch CR28127 has been updated forcibly by mkv.

SHA-1: 36eef1555c3a295fa23bdce5c2e96c7187e91480
(0060670)
mkv   
2016-11-22 12:10   
Dear BugMaster,
Branch CR28127 was rebased on current master of occt git-repository.
SHA-1: 36eef1555c3a295fa23bdce5c2e96c7187e91480
(0060671)
mkv   
2016-11-22 12:11   
Dear BugMaster,
Branch CR28127 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 36eef1555c3a295fa23bdce5c2e96c7187e91480

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1149

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR28127-master-OCCT/Debian70-64/bugs/vis/bug28127.html [^]
http://occt-tests/CR28127-master-OCCT/Windows-64-VC10/bugs/vis/bug28127.html [^]
bugs vis bug28127: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91144898 / 91251319 [-0.12%]
Total CPU difference: 21610.950000000263 / 21562.550000000196 [+0.22%]
products component :
Total MEMORY difference: 30036096 / 29961876 [+0.25%]
Total CPU difference: 5299.639999999974 / 5301.519999999997 [-0.04%]

Testing on Windows:
occt component :
Total MEMORY difference: 56671558 / 56678110 [-0.01%]
Total CPU difference: 20273.88995999846 / 20835.431159598455 [-2.70%]
products component :
Total MEMORY difference: 20831243 / 20798116 [+0.16%]
Total CPU difference: 5275.875819499976 / 5252.881272099973 [+0.44%]

There are no differences in images found by testdiff.
(0060672)
mkv   
2016-11-22 12:11   
Dear BugMaster,
Branch CR28127 is TESTED.
(0061301)
git   
2016-12-07 11:31   
Branch CR28127 has been deleted by kgv.

SHA-1: 36eef1555c3a295fa23bdce5c2e96c7187e91480