Archived issue #0026734
Visualization, TKOpenGl - drop outdated UserDraw interfaces
Description
For the moment TKOpenGl provides two UserDraw interfaces, redraw callback assigned to window:
and UserDraw callback for creating custom OpenGl_Element presentations:
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.
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 reproduce
N/A
Additional information
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().
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().
Public activity
14 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
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: Author
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.
[revision removed]
Detailed log of new commits:
Author: Author
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: Author
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.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
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().
[revision removed]
Detailed log of new commits:
Author: Author
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().
Patch is ready for review in branch CR26734_1 (branch CR26734 contains 3 independent parts of the patch).
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch CR26734_1 reviewed without remarks, ready for testing.
Dear Commenter 1,
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.
[revision removed]
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.
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.
[revision removed]
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.
Dear kgv,
Branch [archived branch] has been rejected due to:
- compilation errors
Branch [archived branch] has been rejected due to:
- compilation errors
Branch [archived branch] has been updated by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Thu Oct 1 17:11:39 2015 +0300
VocelClient_VisDrawer - do not include removed header
[revision removed]
Detailed log of new commits:
Author: Author
Date: Thu Oct 1 17:11:39 2015 +0300
VocelClient_VisDrawer - do not include removed header
Please check sample compilation within updated branch CR26734_1.
Re-testing is not needed.
Re-testing is not needed.
Dear Commenter 1,
Branch CR26734_1 from occt git-repository (and master from products git-repository) was recompiled on Linux, MacOS and Windows platforms on Release mode.
[revision removed]
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.
Branch CR26734_1 from occt git-repository (and master from products git-repository) was recompiled on Linux, MacOS and Windows platforms on Release mode.
[revision removed]
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.
Dear Commenter 1,
Branch CR26734_1 is TESTED.
Branch CR26734_1 is TESTED.
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Related records