Archived issue #0023067
OpenGl package API needed by UserDraw feature is not exported
Description
In the frames of #0022819 it was decided not to export any OpenGl classes except the graphic driver class methods.
However, an application that uses UserDraw functionality needs to access at least the following OpenGl classes so they should be exported from TKOpenGl library under Windows:
- OpenGl_Element - the application that uses UserDraw should derive custom element class(es) from OpenGl_Element abstract base
- OpenGl_Workspace - custom element's Render() method needs the current state parameters
- OpenGl_Aspect* - visual parameters of various primitive types
- OpenGl_Context - to access OpenGL extensions (already exported)
Complete list of OpenGl package classes to be exported should be defined after analysis of standard OpenGl_Element implementations.
However, an application that uses UserDraw functionality needs to access at least the following OpenGl classes so they should be exported from TKOpenGl library under Windows:
- OpenGl_Element - the application that uses UserDraw should derive custom element class(es) from OpenGl_Element abstract base
- OpenGl_Workspace - custom element's Render() method needs the current state parameters
- OpenGl_Aspect* - visual parameters of various primitive types
- OpenGl_Context - to access OpenGL extensions (already exported)
Complete list of OpenGl package classes to be exported should be defined after analysis of standard OpenGl_Element implementations.
Steps to reproduce
pload ALL
vinit
vuserdraw
vfit
vinit
vuserdraw
vfit
Additional information
The following OpenGl package API is now available to applications that implement custom scene elements with help of UserDraw feature:
OpenGl_Window class:
- inline method providing access to OpenGl_Context instance
OpenGl_Workspace class:
- exported AspectXXXX() methods returning current visual parameters in force for different kinds of primitives
- inline methods for text rendering
OpenGl_Context class (see #23022)
OpenGl_ResourceCleaner, OpenGl_ResourceVBO, OpenGl_ResourceTexture classes: should be used to clean-up OpenGL resources safely
OpenGl_AspectFace, OpenGl_AspectLine, OpenGl_AspectMarker, OpenGl_AspectText classes: read access to all attributes with help of inline methods
Other state parameters should be obtained with help of OpenGL API calls.
vuserdraw DRAW command has been added in order to perform basic checking of UserDraw feature availability and operation.
OpenGl_Window class:
- inline method providing access to OpenGl_Context instance
OpenGl_Workspace class:
- exported AspectXXXX() methods returning current visual parameters in force for different kinds of primitives
- inline methods for text rendering
OpenGl_Context class (see #23022)
OpenGl_ResourceCleaner, OpenGl_ResourceVBO, OpenGl_ResourceTexture classes: should be used to clean-up OpenGL resources safely
OpenGl_AspectFace, OpenGl_AspectLine, OpenGl_AspectMarker, OpenGl_AspectText classes: read access to all attributes with help of inline methods
Other state parameters should be obtained with help of OpenGL API calls.
vuserdraw DRAW command has been added in order to perform basic checking of UserDraw feature availability and operation.
Public activity
7 archived notes
Participants are labeled by their role within this record.
CR23067 branch is ready for reviewing.
vuserdraw command added for testing
Please review the branch.
Please review the branch.
Separate source file ViewerTest_OpenGlCommands.cxx added for commands testing low-level TKOpenGl features.
CR23067 ready for reviewing.
CR23067 ready for reviewing.
Patch is OK, please test.
Dear san,
Workbench KAS:dev:mkv-23067-occt was created from git branch CR23067
(and mkv-23067-products from svn trunk) and compiled on Linux platform.
There are following errors during linking:
Check of undefined symbols with LD_LIBRARY_PATH :
mkv-23067-occt/lin/lib/libTKOpenGl.so: undefined reference to `OpenGl_Resource_Type_()'
mkv-23067-occt/lin/lib/libTKOpenGl.so: undefined reference to `typeinfo for OpenGl_Resource'
Workbench KAS:dev:mkv-23067-occt was created from git branch CR23067
(and mkv-23067-products from svn trunk) and compiled on Linux platform.
There are following errors during linking:
Check of undefined symbols with LD_LIBRARY_PATH :
mkv-23067-occt/lin/lib/libTKOpenGl.so: undefined reference to `OpenGl_Resource_Type_()'
mkv-23067-occt/lin/lib/libTKOpenGl.so: undefined reference to `typeinfo for OpenGl_Resource'
Corrected, please test
Dear Commenter 1,
Workbench KAS:dev:mkv-23067-occt was created from git branch CR23067 (and mkv-23067-products from svn trunk) and compiled on Linux platform.
There are not regressions in mkv-23067-products regarding to KAS:dev:products-20120330-opt
Test case for this fix is chl 934 Z3. It's OK.
See results in /QADisk/occttests/results/KAS/dev/mkv-23067-products_09042012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120330-opt_30032012/lin
See test cases in /QADisk/occttests/tests/ED
Workbench KAS:dev:mkv-23067-occt was created from git branch CR23067 (and mkv-23067-products from svn trunk) and compiled on Linux platform.
There are not regressions in mkv-23067-products regarding to KAS:dev:products-20120330-opt
Test case for this fix is chl 934 Z3. It's OK.
See results in /QADisk/occttests/results/KAS/dev/mkv-23067-products_09042012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120330-opt_30032012/lin
See test cases in /QADisk/occttests/tests/ED
Related records