0027670: Visualization - avoid duplication of structures defining primitive array...
authorkgv <kgv@opencascade.com>
Wed, 13 Jul 2016 16:36:20 +0000 (19:36 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 14 Jul 2016 10:24:40 +0000 (13:24 +0300)
commitb647266461fb2c92d199ff6d04ed6424514cf23b
treec2ac2697e32eff1f0045d78f20a06be8b439a095
parent28cab3768f75ea7dc3ce95d80c9e649d147f4180
0027670: Visualization - avoid duplication of structures defining primitive array presentation aspects

Quantity_ColorRGBA has been introduced as convenient structure holding Vec4 for OpenGL.
Graphic3d_PolygonOffset has been added as replacement for TEL_POFFSET_PARAM.

Duplicating definition of Hatch Styles TEL_HS_*** has been removed;
Aspect_HatchStyle enum now follows values of TEL_HS_*** for compatibility.
TelCullMode enum has been removed.

Aspect_AspectLine has been merged into Graphic3d_AspectLine3d.
Aspect_AspectMarker has been merged into Graphic3d_AspectMarker3d.
Aspect_AspectFillArea has been merged into Graphic3d_AspectFillArea3d.
Graphic3d_CAspectFillArea have been removed.

OpenGl_AspectLine now stores Graphic3d_AspectLine3d as class field.
OpenGl_AspectMarker now stores Graphic3d_AspectMarker3d as class field.
OpenGl_AspectText now stores Graphic3d_AspectText3d as class field.
OpenGl_AspectFace now stores Graphic3d_AspectFillArea3d as class field.

Graphic3d_AspectFillArea3d - back face culling is now enabled by default.
TKOpenGl now relies on Graphic3d_Group::IsClosed() flag to disable face culling.
StdPrs_ShadedShape now does not modify aspect for different culling modes.

Headers InterfaceGraphic_Graphic3d.hxx, InterfaceGraphic_telem.hxx, InterfaceGraphic_tgl_all.hxx
defining obsolete structures CALL_DEF_COLOR, CALL_DEF_POINT,
CALL_DEF_MATERIAL, CALL_DEF_TRANSFORM_PERSISTENCE, TEL_POINT, TEL_COLOUR
have been removed.

Useless and broken test case bugs/vis/buc60821 has been removed.

OpenGl_Workspace::myAspectFaceApplied and myAspectMarkerApplied have been replaced
from OpenGl_AspectFace*/OpenGl_AspectMarker*
to Handle(Graphic3d_AspectFillArea3d)/Handle(Graphic3d_AspectMarker3d).
This eliminates reading from freed memory
(e.g. when OpenGl_AspectFace is allocated on stack like in OpenGl_Trihedron).

OpenGl_PrimitiveArray::drawEdges() - fix drawing non-indexed array from VBO (access violation due to NULL handle).

AIS_Dimension::DrawArrow() - added missing initialization of 3D arrow aspect.
AIS_Manipulator::Compute() now creates dedicated Face Aspect for each axis.
V3d_CircularGrid, V3d_RectangularGrid now create dedicated line aspects with different color.
AIS_InteractiveObject::SetMaterial() - do not modify global ShadingAspect.
118 files changed:
dox/dev_guides/upgrade/upgrade.md
samples/mfc/standard/Common/StdAfx.h
src/AIS/AIS_Dimension.cxx
src/AIS/AIS_GraphicTool.cxx
src/AIS/AIS_InteractiveObject.cxx
src/AIS/AIS_Manipulator.cxx
src/AIS/AIS_Plane.cxx
src/AIS/AIS_Point.cxx
src/AIS/AIS_PointCloud.cxx
src/AIS/AIS_RubberBand.cxx
src/AIS/AIS_TextLabel.cxx
src/AIS/AIS_TextLabel.hxx
src/AIS/AIS_TexturedShape.cxx
src/Aspect/Aspect_AspectFillArea.cxx [deleted file]
src/Aspect/Aspect_AspectFillArea.hxx [deleted file]
src/Aspect/Aspect_AspectLine.cxx [deleted file]
src/Aspect/Aspect_AspectLine.hxx [deleted file]
src/Aspect/Aspect_AspectMarker.cxx [deleted file]
src/Aspect/Aspect_AspectMarker.hxx [deleted file]
src/Aspect/Aspect_HatchStyle.hxx
src/Aspect/FILES
src/DsgPrs/DsgPrs.cxx
src/DsgPrs/DsgPrs_AnglePresentation.cxx
src/DsgPrs/DsgPrs_DatumPrs.cxx
src/DsgPrs/DsgPrs_DiameterPresentation.cxx
src/DsgPrs/DsgPrs_EllipseRadiusPresentation.cxx
src/DsgPrs/DsgPrs_FilletRadiusPresentation.cxx
src/DsgPrs/DsgPrs_FixPresentation.cxx
src/DsgPrs/DsgPrs_IdenticPresentation.cxx
src/DsgPrs/DsgPrs_LengthPresentation.cxx
src/DsgPrs/DsgPrs_OffsetPresentation.cxx
src/DsgPrs/DsgPrs_RadiusPresentation.cxx
src/DsgPrs/DsgPrs_SymmetricPresentation.cxx
src/Graphic3d/FILES
src/Graphic3d/Graphic3d_AspectFillArea3d.cxx
src/Graphic3d/Graphic3d_AspectFillArea3d.hxx
src/Graphic3d/Graphic3d_AspectLine3d.cxx
src/Graphic3d/Graphic3d_AspectLine3d.hxx
src/Graphic3d/Graphic3d_AspectMarker3d.cxx
src/Graphic3d/Graphic3d_AspectMarker3d.hxx
src/Graphic3d/Graphic3d_AspectText3d.cxx
src/Graphic3d/Graphic3d_AspectText3d.hxx
src/Graphic3d/Graphic3d_CAspectFillArea.hxx [deleted file]
src/Graphic3d/Graphic3d_CAspectLine.hxx [deleted file]
src/Graphic3d/Graphic3d_CAspectMarker.hxx [deleted file]
src/Graphic3d/Graphic3d_CAspectText.hxx [deleted file]
src/Graphic3d/Graphic3d_CLight.hxx
src/Graphic3d/Graphic3d_CStructure.hxx
src/Graphic3d/Graphic3d_ClipPlane.cxx
src/Graphic3d/Graphic3d_Group.cxx
src/Graphic3d/Graphic3d_Group.hxx
src/Graphic3d/Graphic3d_PolygonOffset.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_Structure.cxx
src/Graphic3d/Graphic3d_Vertex.hxx
src/InterfaceGraphic/FILES
src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx [deleted file]
src/InterfaceGraphic/InterfaceGraphic_telem.hxx [deleted file]
src/InterfaceGraphic/InterfaceGraphic_tgl_all.hxx [deleted file]
src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx
src/MeshVS/MeshVS_MeshPrsBuilder.cxx
src/MeshVS/MeshVS_NodalColorPrsBuilder.cxx
src/OpenGl/OpenGl_AspectFace.cxx
src/OpenGl/OpenGl_AspectFace.hxx
src/OpenGl/OpenGl_AspectLine.cxx
src/OpenGl/OpenGl_AspectLine.hxx
src/OpenGl/OpenGl_AspectMarker.cxx
src/OpenGl/OpenGl_AspectMarker.hxx
src/OpenGl/OpenGl_AspectText.cxx
src/OpenGl/OpenGl_AspectText.hxx
src/OpenGl/OpenGl_BackgroundArray.cxx
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_Context.hxx
src/OpenGl/OpenGl_GlFunctions.hxx
src/OpenGl/OpenGl_GraduatedTrihedron.cxx
src/OpenGl/OpenGl_GraduatedTrihedron.hxx
src/OpenGl/OpenGl_GraphicDriver.cxx
src/OpenGl/OpenGl_Group.cxx
src/OpenGl/OpenGl_Group.hxx
src/OpenGl/OpenGl_Layer.cxx
src/OpenGl/OpenGl_Layer.hxx
src/OpenGl/OpenGl_LayerList.cxx
src/OpenGl/OpenGl_LayerList.hxx
src/OpenGl/OpenGl_LineAttributes.cxx
src/OpenGl/OpenGl_LineAttributes.hxx
src/OpenGl/OpenGl_Matrix.hxx
src/OpenGl/OpenGl_PrimitiveArray.cxx
src/OpenGl/OpenGl_PrimitiveArray.hxx
src/OpenGl/OpenGl_ShaderProgram.hxx
src/OpenGl/OpenGl_ShaderStates.hxx
src/OpenGl/OpenGl_Structure.cxx
src/OpenGl/OpenGl_Structure.hxx
src/OpenGl/OpenGl_Text.cxx
src/OpenGl/OpenGl_Text.hxx
src/OpenGl/OpenGl_TextParam.hxx
src/OpenGl/OpenGl_Trihedron.cxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_Raytrace.cxx
src/OpenGl/OpenGl_View_Redraw.cxx
src/OpenGl/OpenGl_Workspace.cxx
src/OpenGl/OpenGl_Workspace.hxx
src/QABugs/FILES
src/QABugs/QABugs_17.cxx
src/QABugs/QABugs_MyText.cxx [deleted file]
src/QABugs/QABugs_MyText.hxx [deleted file]
src/Quantity/FILES
src/Quantity/Quantity_Color.cxx
src/Quantity/Quantity_Color.hxx
src/Quantity/Quantity_ColorRGBA.hxx [new file with mode: 0644]
src/StdPrs/StdPrs_BndBox.cxx
src/StdPrs/StdPrs_ShadedShape.cxx
src/StdPrs/StdPrs_ShadedSurface.cxx
src/V3d/V3d_CircularGrid.cxx
src/V3d/V3d_RectangularGrid.cxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
tests/bugs/vis/buc60821 [deleted file]
tests/bugs/vis/bug24837_2