View Issue Details

IDProjectCategoryView StatusLast Update
0023115Open CASCADEOCCT:Visualizationpublic2012-04-23 12:33
ReporterdbvAssigned Tosan 
PriorityimmediateSeverityminor 
Status closedResolutionfixed 
Product Version6.5.3 
Target Version6.5.3Fixed in Version6.5.3 
Summary0023115: Polygon offset doesn't applied in Viewer3D sample
DescriptionFunction TelUpdatePolygonOffsets is not called during rendering shape
Steps To Reproducepload ALL
restore D:/work/OCC/work/ros/samples/mfc/standard/04_Viewer3d/Data/bottle.brep b
explode b F
vinit
vdisplay b
vsetdispmode 1
vpolygonoffset b 1 1.5 0.5

vdisplay b_16
vtexture b_16 D:/work/OCC/work/ros/carrelage1.gif
vtexrepeat b_16 3 2

vdisplay b_21
vtexture b_21 D:/work/OCC/work/ros/carrelage1.gif
vtexrepeat b_21 3 2

vfit
vpolygonoffset b
vpolygonoffset b_16
vpolygonoffset b_21

Additional information
and documentation updates
AIS_InteractiveObject::SetPolygonOffsets() method has been patched to update also all object's Graphic3d_Group instances that has Graphic3d_AsepctFillArea3d aspect set. Without this, changing polygon offset parameters for Graphic3d_Structure only has no effect.

vpolygonoffset DRAW command added to set or print polygon offset parameters for a displayed object or to print the default values.
TagsNo tags attached.
Test case numberchl 934 X0

Attached Files

  • Viewer3D_Sample.PNG (150,007 bytes)
  • X0 (1,928 bytes)

Relationships

related to 0023117 closedbugmaster TKV3d and TKOpenGl code clean-up 
related to 0023118 closedbugmaster Incomplete face aspect data returned by Graphic3d_Group::GroupPrimitivesAspect() 
child of 0022819 closedbugmaster Redesign of OpenGl driver 

Activities

dbv

2012-04-17 12:42

developer  

Viewer3D_Sample.PNG (150,007 bytes)

san

2012-04-18 18:45

developer   ~0020412

In fact, there are two regressions in one:

1. Polygon offset parameters are not taken into account while redrawing a 3D scene

2. Default polygon offset is Aspect_POM_None that effectively disables polygon offsets. Prior to OCCT 6.5.3, default polygon offset settings were:
mode = Aspect_POM_Fill
factor = 1.0
units = 0.0

san

2012-04-18 18:52

developer   ~0020413

Previous note is incorrect: by default polygon offsets are still enabled at OpenGl_Workspace level. Thus there is only one problem.

san

2012-04-18 21:24

developer   ~0020414

Branch CR23115 is ready for testing.

san

2012-04-18 21:33

developer   ~0020415

Last edited: 2012-04-18 21:35

The problem resulted from changed behavior of the graphic driver after 0022819 implementation.

Formerly, the face aspect defined at the structure level was applied at the beginning of structure rendering, and corresponding "elements" were also executed and thus converted into sets of OpenGL calls. Later, when each group belonging to the structure applied its own face aspect, it had polygon offset mode set to default (Aspect_POM_None) so polygon offset parameters were not changed and the structure's ones still were in force.

Now, the face aspect (as well as other aspect types) is rendered (converted into sets of corresponding OpenGL calls) only when some OpenGl_Element asks for this using OpenGl_Workspace::AspectFace(Standard_True) call. At the moment when this element starts to draw something, OpenGl_Workspace holds the face aspect belonging to corresponding group if it is set, and the structure's aspect is simply ignored in such a case. This looks correct and consistent, however the old code that relied on immediate execution of the structure's aspects might not work, similarly to AIS_InteractiveObject::SetPolygonOffsets() method.

apn

2012-04-19 11:48

administrator   ~0020417

Dear BugMaster,
      Workbench KAS:dev:mkv-23115-occt was created from git branch CR23115 (and mkv-23115-products from svn trunk) and compiled on Linux platform.
    
      There are not regressions in mkv-23115-products regarding to KAS:dev:products-20120415-opt
      
      There are not improvements in mkv-23115-products regarding to KAS:dev:products-20120415-opt

      Test case for this fix is chl 934 X0. It's OK.
      
      See results in /QADisk/occttests/results/KAS/dev/mkv-23115-products_19042012/lin
      See reference results in /QADisk/occttests/results/KAS/dev/products-20120415-opt_13042012/lin
      See test cases in /QADisk/occttests/tests/ED

san

2012-04-20 10:32

developer   ~0020420

Improved patch including a workaround for 0023118 is ready in branch CR23115_1

san

2012-04-20 10:33

developer   ~0020421

Branch CR23115_1 is ready for testing.

NOTE: Please update the test case using "Steps to reproduce" section of this issue, it has been updated!

apn

2012-04-20 13:15

administrator  

X0 (1,928 bytes)

mkv

2012-04-20 15:56

tester   ~0020424

Dear BugMaster,
Workbench KAS:dev:mkv-23115-1-occt was created from git branch CR23115_1
(and mkv-23115-1-products from svn trunk) and compiled on Linux platform.

Test case for this fix is chl 934 X0. It's OK.
There are not regressions in mkv-23115-1-products regarding to KAS:dev:products-20120415-opt
There are not improvements in mkv-23115-1-products regarding to KAS:dev:products-20120415-opt

See results in /QADisk/occttests/results/KAS/dev/mkv-23115-1-products_20042012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120415-opt_13042012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification

Related Changesets

occt: master 3ddebf91

2012-04-18 17:15:49

san

Details Diff
0023115: Polygon offset doesn't applied in Viewer3D sample

- AIS_InteractiveObject::SetPolygonOffsets() patched to update all object's groups that has AspectFillArea3d set.
- vpolygonoffset DRAW command added.
Affected Issues
0023115
mod - src/AIS/AIS_InteractiveObject.cxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File

occt: master 60761105

2012-04-20 06:27:13

san

Details Diff
0023115: Polygon offset doesn't applied in Viewer3D sample

Graphic3d_AspectFillArea3d: use Aspect_POM_Fill polygon offset mode by default

Graphic3d_Group: disable texture mapping if invalid texture ID is specified

AIS_InteractiveObject: remove Fill() method, polygon offset parameters
should be applied explicitly in Compute() method or by SetPolygonOffsets()

AIS_TexturedShape: Compute() now takes polygon offsets into account
Affected Issues
0023115
mod - src/AIS/AIS_InteractiveObject.cdl Diff File
mod - src/AIS/AIS_InteractiveObject.cxx Diff File
mod - src/AIS/AIS_TexturedShape.cxx Diff File
mod - src/Graphic3d/Graphic3d_AspectFillArea3d.cxx Diff File
mod - src/Graphic3d/Graphic3d_Group_8.cxx Diff File

Issue History

Date Modified Username Field Change
2012-04-17 12:42 dbv New Issue
2012-04-17 12:42 dbv Assigned To => san
2012-04-17 12:42 dbv File Added: Viewer3D_Sample.PNG
2012-04-17 14:57 bugmaster Status new => assigned
2012-04-17 18:17 san Priority normal => immediate
2012-04-17 18:17 san Target Version => 6.5.3
2012-04-18 18:45 san Note Added: 0020412
2012-04-18 18:52 san Note Added: 0020413
2012-04-18 21:22 san Steps to Reproduce Updated
2012-04-18 21:22 san Additional Information Updated
2012-04-18 21:23 san Relationship added child of 0022819
2012-04-18 21:23 san Status assigned => resolved
2012-04-18 21:24 san Note Added: 0020414
2012-04-18 21:24 san Assigned To san => bugmaster
2012-04-18 21:24 san Status resolved => reviewed
2012-04-18 21:33 san Note Added: 0020415
2012-04-18 21:34 san Note Edited: 0020415
2012-04-18 21:35 san Note Edited: 0020415
2012-04-18 21:39 mkv Assigned To bugmaster => apn
2012-04-19 11:48 apn Note Added: 0020417
2012-04-19 11:49 apn Test case number => chl 934 X0
2012-04-19 11:49 apn Assigned To apn => bugmaster
2012-04-19 11:49 apn Status reviewed => tested
2012-04-19 11:49 apn File Added: X0
2012-04-19 15:43 san Relationship added related to 0023117
2012-04-19 20:57 san Relationship added related to 0023118
2012-04-20 10:30 san Steps to Reproduce Updated
2012-04-20 10:31 san Assigned To bugmaster => san
2012-04-20 10:31 san Status tested => assigned
2012-04-20 10:32 san Note Added: 0020420
2012-04-20 10:32 san Status assigned => resolved
2012-04-20 10:33 san Note Added: 0020421
2012-04-20 10:33 san Assigned To san => bugmaster
2012-04-20 10:33 san Status resolved => reviewed
2012-04-20 10:38 mkv Assigned To bugmaster => mkv
2012-04-20 13:15 apn File Deleted: X0
2012-04-20 13:15 apn File Added: X0
2012-04-20 15:56 mkv Note Added: 0020424
2012-04-20 15:57 mkv Status reviewed => tested
2012-04-20 15:58 mkv Assigned To mkv => bugmaster
2012-04-23 12:33 san Changeset attached => occt master 60761105
2012-04-23 12:33 san Changeset attached => occt master 3ddebf91
2012-04-23 12:33 san Assigned To bugmaster => san
2012-04-23 12:33 san Status tested => verified
2012-04-23 12:33 san Resolution open => fixed