View Issue Details

IDProjectCategoryView StatusLast Update
0028127Open CASCADEOCCT:Visualizationpublic2016-12-09 16:39
Reporterkgv Assigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version6.8.0 
Target Version7.1.0Fixed in Version7.1.0 
Summary0028127: Visualization - transparent object breaks Z-Layer depth buffer clear
DescriptionIf 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.
Steps To Reproduce
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" }

TagsNo tags attached.
Test case numberbugs vis bug28127

Attached Files

  • depthclear_notransp_OK.png (4,993 bytes)
  • depthclear_transp_KO.png (4,178 bytes)

Relationships

related to 0027366 closedbugmaster Community Z-Layer: Strange highlight behaviour 
related to 0027818 closedkgv Open CASCADE Visualization - provide an interface to define highlight presentation properties 

Activities

kgv

2016-11-18 15:41

developer  

depthclear_notransp_OK.png (4,993 bytes)

kgv

2016-11-18 15:41

developer  

depthclear_transp_KO.png (4,178 bytes)

git

2016-11-18 16:02

administrator   ~0060541

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

kgv

2016-11-18 16:03

developer   ~0060542

Patch is ready for review.

git

2016-11-18 16:07

administrator   ~0060543

Branch CR28127 has been updated forcibly by kgv.

SHA-1: efbdca3c025f535eebed1beb79f0a9a6b4191f55

san

2016-11-21 13:36

developer   ~0060612

Branch CR28127 reviewed without remarks, ready for testing.

git

2016-11-21 14:24

administrator   ~0060621

Branch CR28127 has been updated forcibly by mkv.

SHA-1: 36eef1555c3a295fa23bdce5c2e96c7187e91480

mkv

2016-11-22 12:10

tester   ~0060670

Dear BugMaster,
Branch CR28127 was rebased on current master of occt git-repository.
SHA-1: 36eef1555c3a295fa23bdce5c2e96c7187e91480

mkv

2016-11-22 12:11

tester   ~0060671

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.

mkv

2016-11-22 12:11

tester   ~0060672

Dear BugMaster,
Branch CR28127 is TESTED.

git

2016-12-07 11:31

administrator   ~0061301

Branch CR28127 has been deleted by kgv.

SHA-1: 36eef1555c3a295fa23bdce5c2e96c7187e91480

Related Changesets

occt: master b3eab8ef

2016-11-18 13:00:59

kgv


Committer: apn Details Diff
0028127: Visualization - transparent object breaks Z-Layer depth buffer clear

OpenGl_LayerList::Render() now calls glDepthMask(GL_TRUE) before clearing depth buffer.
Depth buffer is now cleared even if ZLayer with this command has no structures.
Affected Issues
0028127
mod - src/OpenGl/OpenGl_Layer.cxx Diff File
mod - src/OpenGl/OpenGl_LayerList.cxx Diff File
add - tests/bugs/vis/bug28127 Diff File

Issue History

Date Modified Username Field Change
2016-11-18 15:39 kgv New Issue
2016-11-18 15:39 kgv Assigned To => kgv
2016-11-18 15:41 kgv File Added: depthclear_notransp_OK.png
2016-11-18 15:41 kgv File Added: depthclear_transp_KO.png
2016-11-18 15:45 kgv Steps to Reproduce Updated
2016-11-18 16:02 git Note Added: 0060541
2016-11-18 16:03 kgv Note Added: 0060542
2016-11-18 16:03 kgv Assigned To kgv => san
2016-11-18 16:03 kgv Status new => resolved
2016-11-18 16:03 kgv Target Version 7.2.0 => 7.1.0
2016-11-18 16:05 kgv Product Version 7.0.0 => 6.8.0
2016-11-18 16:07 git Note Added: 0060543
2016-11-19 08:58 kgv Relationship added related to 0027366
2016-11-19 08:58 kgv Relationship added related to 0027818
2016-11-21 13:36 san Note Added: 0060612
2016-11-21 13:36 san Assigned To san => bugmaster
2016-11-21 13:36 san Status resolved => reviewed
2016-11-21 14:24 git Note Added: 0060621
2016-11-21 14:43 mkv Assigned To bugmaster => mkv
2016-11-22 12:10 mkv Note Added: 0060670
2016-11-22 12:11 mkv Note Added: 0060671
2016-11-22 12:11 mkv Note Added: 0060672
2016-11-22 12:11 mkv Assigned To mkv => bugmaster
2016-11-22 12:11 mkv Status reviewed => tested
2016-11-22 12:12 mkv Test case number => bugs vis bug28127
2016-11-24 15:52 apn Changeset attached => occt master b3eab8ef
2016-11-24 15:52 apn Assigned To bugmaster => apn
2016-11-24 15:52 apn Status tested => verified
2016-11-24 15:52 apn Resolution open => fixed
2016-12-07 11:31 git Note Added: 0061301
2016-12-09 16:29 aiv Status verified => closed
2016-12-09 16:39 aiv Fixed in Version => 7.1.0