0024406: Visualization - crash on re-usage of the same primitive array
authorkgv <kgv@opencascade.com>
Thu, 17 Apr 2014 14:01:04 +0000 (18:01 +0400)
committerapn <apn@opencascade.com>
Thu, 17 Apr 2014 14:01:51 +0000 (18:01 +0400)
commit871fa1038d11e7b14f44771f3c9df1a89bc3618c
tree4a1401ea61d8c757b3b2b4d3cfc1193159916b77
parentc002793be1ddc83e4d12621b2ca45856c44613da
0024406: Visualization - crash on re-usage of the same primitive array

Redesign Graphic3d_ArrayOfPrimitives
Store vertices data in buffer objects managed using smart-pointers
- no more low-level memory corruption by memory releasing after VBO creation.
Remove broken hasEdgeInfos.

Interleave vertex attributes (position, color, normal, uv) in single buffer.
Remove from Graphic3d_ArrayOfPrimitives methods ::Orientate().
Remove structures Graphic3d_PrimitiveArray, CALL_DEF_PARRAY.
Add support for 2D vertex arrays.

Graphic3d_Group - remove array or primitive arrays.
Introduce more universal method Graphic3d_Group::AddPrimitiveArray().

Fix warning
46 files changed:
src/AIS/AIS_Triangulation.cxx
src/Graphic3d/FILES
src/Graphic3d/Graphic3d.cdl
src/Graphic3d/Graphic3d_ArrayOfPoints.cxx
src/Graphic3d/Graphic3d_ArrayOfPolygons.cdl
src/Graphic3d/Graphic3d_ArrayOfPolygons.cxx
src/Graphic3d/Graphic3d_ArrayOfPolylines.cdl
src/Graphic3d/Graphic3d_ArrayOfPolylines.cxx
src/Graphic3d/Graphic3d_ArrayOfPrimitives.cdl
src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx
src/Graphic3d/Graphic3d_ArrayOfPrimitives.lxx
src/Graphic3d/Graphic3d_ArrayOfQuadrangleStrips.cxx
src/Graphic3d/Graphic3d_ArrayOfQuadrangles.cdl
src/Graphic3d/Graphic3d_ArrayOfQuadrangles.cxx
src/Graphic3d/Graphic3d_ArrayOfSegments.cxx
src/Graphic3d/Graphic3d_ArrayOfTriangleFans.cxx
src/Graphic3d/Graphic3d_ArrayOfTriangleStrips.cxx
src/Graphic3d/Graphic3d_ArrayOfTriangles.cdl
src/Graphic3d/Graphic3d_ArrayOfTriangles.cxx
src/Graphic3d/Graphic3d_BoundBuffer.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_BoundBuffer_Handle.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_Buffer.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_Buffer_Handle.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_GraphicDriver.cdl
src/Graphic3d/Graphic3d_Group.cdl
src/Graphic3d/Graphic3d_Group.cxx
src/Graphic3d/Graphic3d_IndexBuffer.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_IndexBuffer_Handle.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_PrimitiveArray.hxx [deleted file]
src/InterfaceGraphic/FILES
src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx
src/InterfaceGraphic/InterfaceGraphic_PrimitiveArray.hxx [deleted file]
src/NCollection/NCollection_Vec4.hxx
src/OpenGl/OpenGl_CappingAlgo.cxx
src/OpenGl/OpenGl_GraphicDriver.hxx
src/OpenGl/OpenGl_Group.cxx
src/OpenGl/OpenGl_Group.hxx
src/OpenGl/OpenGl_PrimitiveArray.cxx
src/OpenGl/OpenGl_PrimitiveArray.hxx
src/OpenGl/OpenGl_SceneGeometry.cxx
src/OpenGl/OpenGl_VertexBuffer.cxx
src/OpenGl/OpenGl_VertexBuffer.hxx
src/OpenGl/OpenGl_Workspace.hxx
src/OpenGl/OpenGl_Workspace_Raytrace.cxx
src/StdPrs/StdPrs_ShadedShape.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx