View Issue Details

IDProjectCategoryView StatusLast Update
0026734Open CASCADEOCCT:Visualizationpublic2016-04-20 15:49
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026734: Visualization, TKOpenGl - drop outdated UserDraw interfaces
DescriptionFor the moment TKOpenGl provides two UserDraw interfaces, redraw callback assigned to window:
typedef int (*Aspect_GraphicCallbackProc) (Aspect_Drawable theWindowID,
                                           void* theUserData,
                                           Aspect_GraphicCallbackStruct* theCallData);

and UserDraw callback for creating custom OpenGl_Element presentations:
  typedef OpenGl_Element* (*OpenGl_UserDrawCallback_t )(const CALL_DEF_USERDRAW* );
  OpenGl_UserDrawCallback_t& OpenGl_GraphicDriver::UserDrawCallback();


Both interfaces are outdated:
- Custom OpenGl_Element presentations can be added directly to OpenGl_Group instance within AIS_InteractiveObject::Compute() method by DownCast() operation.
- OpenGl_View and OpenGl_GraphicDriver can be inherited to override and extend redrawing routines.

Thus it is suggested to eliminate outdated C-like interfaces.
Steps To ReproduceN/A
Additional information
and documentation updates
Outdated interfaces Aspect_GraphicCallbackProc, Graphic3d_CUserDraw, Graphic3d_Group::UserDraw(), OpenGl_GraphicDriver::UserDrawCallback() have been dropped.
    
V3d_View::SetWindow() - optional arguments initializing redraw callback have been removed. Application should now inherit from classes OpenGl_GraphicDriver (with overridden method CreateView()) and OpenGl_View with one or several overridden methods from list: redraw(), redrawImmediate(), render(), renderScene(), drawBackground(), renderStructs().
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0024776 closedkgv Open CASCADE Visualization - inherit OpenGl_View from Graphic3d_CView 
parent of 0026807 closedbugmaster Open CASCADE Documentation - describe dropping of Visual3d and UserDraw within porting notes 

Activities

git

2015-09-29 09:32

administrator   ~0046243

Branch CR26734 has been created by kgv.

SHA-1: 4adfbfd7c340034cf32b979514a24563eace7f81


Detailed log of new commits:

Author: kgv
Date: Tue Sep 29 09:30:58 2015 +0300

    Drop interfaces Aspect_GraphicCallbackProc, Graphic3d_CUserDraw,
    Graphic3d_Group::UserDraw(), OpenGl_GraphicDriver::UserDrawCallback().
    
    V3d_View::SetWindow() - remove optional arguments initializing redraw callback.
    OpenGl_View, declate following methods as virtual for inheritance:
    redraw(), redrawImmediate(), render(), renderScene(), drawBackground(), renderStructs().

Author: kgv
Date: Tue Sep 29 09:22:31 2015 +0300

    0026734: Visualization, TKOpenGl - drop outdated UserDraw interfaces
    
    Update ViewerTest and VoxelDemo to not use UserDraw callbacks.

git

2015-09-29 13:43

administrator   ~0046251

Branch CR26734 has been updated forcibly by kgv.

SHA-1: 6affb34a3900d91256b3d3dd8731bb0a638e1211

git

2015-09-29 13:45

administrator   ~0046252

Branch CR26734_1 has been created by kgv.

SHA-1: f583b56644912c04138acdfa90c18899a8132556


Detailed log of new commits:

Author: kgv
Date: Tue Sep 29 10:45:19 2015 +0300

    0026734: Visualization, TKOpenGl - drop outdated UserDraw interfaces
    
    Update ViewerTest and VoxelDemo to not use UserDraw callbacks.
    
    OpenGl_View::blitBuffers() - set 0 GLSL program after blit
    to avoid side effects on code that does not use shaders.
    
    Drop interfaces Aspect_GraphicCallbackProc, Graphic3d_CUserDraw,
    Graphic3d_Group::UserDraw(), OpenGl_GraphicDriver::UserDrawCallback().
    
    V3d_View::SetWindow() - remove optional arguments initializing redraw callback.
    OpenGl_View, declate following methods as virtual for inheritance:
    redraw(), redrawImmediate(), render(), renderScene(), drawBackground(), renderStructs().

kgv

2015-09-29 13:50

developer   ~0046254

Patch is ready for review in branch CR26734_1 (branch CR26734 contains 3 independent parts of the patch).

git

2015-09-29 13:51

administrator   ~0046255

Branch CR26734_1 has been updated forcibly by kgv.

SHA-1: 3fe09979552ae4d2bc8ec34dc4c769990e48390e

san

2015-09-29 22:06

developer   ~0046303

Branch CR26734_1 reviewed without remarks, ready for testing.

mkv

2015-10-01 16:06

tester   ~0046375

Dear BugMaster,
Branch CR26734_1 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: 3fe09979552ae4d2bc8ec34dc4c769990e48390e

Number of compiler warnings:

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

products component :
Linux: 39 (39 on master)
Windows: 0 (0 on master)

There are compilation errors in Qt samples products on windows platform:
http://jenkins-test-01.nnov.opencascade.com:8080/view/CR26734-1-master/job/CR26734-1-master_build_occt_qt_samples_window/1/parsed_console/
1>..\voxeldemo\src\VoxelClient_VisDrawer.cxx(36): fatal error C1083: Cannot open include file: 'Graphic3d_CUserDraw.hxx': No such file or directory

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 93454887 / 93314649 [+0.15%]
Total CPU difference: 19705.97999999941 / 19753.809999999237 [-0.24%]
products component :
Total MEMORY difference: 26241556 / 26309508 [-0.26%]
Total CPU difference: 7359.399999999996 / 7199.699999999998 [+2.22%]

Testing on Windows:
occt component :
Total MEMORY difference: 57919040 / 57934651 [-0.03%]
Total CPU difference: 18074.79066329883 / 17727.329635999078 [+1.96%]
products component :
Total MEMORY difference: 17140774 / 17147122 [-0.04%]
Total CPU difference: 5887.992543299986 / 5624.553654599962 [+4.68%]

There are no differences in images found by testdiff.

mkv

2015-10-01 16:07

tester   ~0046376

Dear kgv,
Branch CR26734_1 has been rejected due to:
- compilation errors

git

2015-10-01 17:11

administrator   ~0046382

Branch CR26734_1 has been updated by kgv.

SHA-1: 87124ee1f80f090c618d9ca77f54f6e37f27d735


Detailed log of new commits:

Author: kgv
Date: Thu Oct 1 17:11:39 2015 +0300

    VocelClient_VisDrawer - do not include removed header

kgv

2015-10-01 17:12

developer   ~0046383

Please check sample compilation within updated branch CR26734_1.
Re-testing is not needed.

mkv

2015-10-02 15:29

tester   ~0046399

Dear BugMaster,
Branch CR26734_1 from occt git-repository (and master from products git-repository) was recompiled on Linux, MacOS and Windows platforms on Release mode.
SHA-1: 87124ee1f80f090c618d9ca77f54f6e37f27d735

Number of compiler warnings:

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

products component :
Linux: 39 (39 on master)
Windows: 0 (0 on master)

There are not compilation errors in Qt samples products on Windows platform.

mkv

2015-10-02 15:30

tester   ~0046400

Dear BugMaster,
Branch CR26734_1 is TESTED.

git

2015-10-16 16:17

administrator   ~0046901

Branch CR26734 has been deleted by kgv.

SHA-1: 6affb34a3900d91256b3d3dd8731bb0a638e1211

git

2015-10-16 16:17

administrator   ~0046902

Branch CR26734_1 has been deleted by kgv.

SHA-1: 87124ee1f80f090c618d9ca77f54f6e37f27d735

Related Changesets

occt: master a521d90d

2015-10-08 06:33:48

kgv


Committer: bugmaster Details Diff
0026734: Visualization, TKOpenGl - drop outdated UserDraw interfaces

Update ViewerTest and VoxelDemo to not use UserDraw callbacks.

OpenGl_View::blitBuffers() - set 0 GLSL program after blit
to avoid side effects on code that does not use shaders.

Drop interfaces Aspect_GraphicCallbackProc, Graphic3d_CUserDraw,
Graphic3d_Group::UserDraw(), OpenGl_GraphicDriver::UserDrawCallback().

V3d_View::SetWindow() - remove optional arguments initializing redraw callback.
OpenGl_View, declare following methods as virtual for inheritance:
redraw(), redrawImmediate(), render(), renderScene(), drawBackground(), renderStructs().

VocelClient_VisDrawer - do not include removed header
Affected Issues
0026734
mod - samples/qt/VoxelDemo/inc/VoxelClient_VisDrawer.h Diff File
mod - samples/qt/VoxelDemo/src/Application.cpp Diff File
mod - samples/qt/VoxelDemo/src/Viewer.cpp Diff File
mod - samples/qt/VoxelDemo/src/VoxelClient_VisDrawer.cxx Diff File
rm - src/Aspect/Aspect_GraphicCallbackProc.hxx Diff File
mod - src/Aspect/FILES Diff File
mod - src/Graphic3d/FILES Diff File
rm - src/Graphic3d/Graphic3d_CUserDraw.hxx Diff File
mod - src/Graphic3d/Graphic3d_CView.hxx Diff File
mod - src/Graphic3d/Graphic3d_Group.cxx Diff File
mod - src/Graphic3d/Graphic3d_Group.hxx Diff File
mod - src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver.cxx Diff File
mod - src/OpenGl/OpenGl_GraphicDriver.hxx Diff File
mod - src/OpenGl/OpenGl_Group.cxx Diff File
mod - src/OpenGl/OpenGl_Group.hxx Diff File
mod - src/OpenGl/OpenGl_View.cxx Diff File
mod - src/OpenGl/OpenGl_View.hxx Diff File
mod - src/OpenGl/OpenGl_View_Redraw.cxx Diff File
mod - src/V3d/V3d_View.cxx Diff File
mod - src/V3d/V3d_View.hxx Diff File
mod - src/ViewerTest/ViewerTest_OpenGlCommands.cxx Diff File
mod - src/Voxel/Voxel_Prs.cxx Diff File
mod - src/Voxel/Voxel_Prs.hxx Diff File

occt: master 7aa74f30

2015-10-10 19:18:47

kgv


Committer: bugmaster Details Diff
0026734: Visualization, D3DHost_View - drop outdated UserDraw interfaces

Correction of test case for issue CR26765
Affected Issues
0026734
mod - src/D3DHost/D3DHost_View.cxx Diff File
mod - src/D3DHost/D3DHost_View.hxx Diff File
mod - tests/boolean/volumemaker/C9 Diff File

Issue History

Date Modified Username Field Change
2015-09-29 09:14 kgv New Issue
2015-09-29 09:14 kgv Assigned To => kgv
2015-09-29 09:15 kgv Relationship added related to 0024776
2015-09-29 09:16 kgv Description Updated
2015-09-29 09:32 git Note Added: 0046243
2015-09-29 13:43 git Note Added: 0046251
2015-09-29 13:45 git Note Added: 0046252
2015-09-29 13:50 kgv Note Added: 0046254
2015-09-29 13:50 kgv Assigned To kgv => san
2015-09-29 13:50 kgv Status new => resolved
2015-09-29 13:50 kgv Additional Information Updated
2015-09-29 13:51 git Note Added: 0046255
2015-09-29 22:06 san Note Added: 0046303
2015-09-29 22:06 san Assigned To san => bugmaster
2015-09-29 22:06 san Status resolved => reviewed
2015-09-30 15:07 mkv Assigned To bugmaster => mkv
2015-10-01 16:06 mkv Note Added: 0046375
2015-10-01 16:07 mkv Note Added: 0046376
2015-10-01 16:07 mkv Assigned To mkv => kgv
2015-10-01 16:07 mkv Status reviewed => assigned
2015-10-01 17:11 git Note Added: 0046382
2015-10-01 17:12 kgv Note Added: 0046383
2015-10-01 17:12 kgv Assigned To kgv => bugmaster
2015-10-01 17:12 kgv Status assigned => resolved
2015-10-01 17:13 kgv Status resolved => reviewed
2015-10-01 18:15 mkv Assigned To bugmaster => mkv
2015-10-02 15:29 mkv Note Added: 0046399
2015-10-02 15:29 mkv Assigned To mkv => bugmaster
2015-10-02 15:29 mkv Status reviewed => tested
2015-10-02 15:30 mkv Note Added: 0046400
2015-10-02 15:31 mkv Test case number => Not needed
2015-10-09 15:22 bugmaster Changeset attached => occt master a521d90d
2015-10-09 15:22 bugmaster Status tested => verified
2015-10-09 15:22 bugmaster Resolution open => fixed
2015-10-16 13:18 bugmaster Changeset attached => occt master 7aa74f30
2015-10-16 16:17 git Note Added: 0046901
2015-10-16 16:17 git Note Added: 0046902
2015-10-24 14:12 kgv Relationship added parent of 0026807
2016-04-20 15:44 aiv Fixed in Version => 7.0.0
2016-04-20 15:49 aiv Status verified => closed