mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
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
This commit is contained in:
@@ -56,14 +56,8 @@ void AIS_Triangulation::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aP
|
||||
Standard_Boolean hasVNormals = myTriangulation->HasNormals();
|
||||
Standard_Boolean hasVColors = (myFlagColor == 1);
|
||||
|
||||
Handle(Graphic3d_ArrayOfTriangles) anArray =
|
||||
new Graphic3d_ArrayOfTriangles ( myNbNodes, //maxVertexs
|
||||
myNbTriangles * 3,//maxEdges
|
||||
hasVNormals, //hasVNormals
|
||||
hasVColors, //hasVColors
|
||||
Standard_False, //hasTexels
|
||||
Standard_True //hasEdgeInfos
|
||||
);
|
||||
Handle(Graphic3d_ArrayOfTriangles) anArray = new Graphic3d_ArrayOfTriangles (myNbNodes, myNbTriangles * 3,
|
||||
hasVNormals, hasVColors, Standard_False);
|
||||
Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
|
||||
Handle(Graphic3d_AspectFillArea3d) aspect = myDrawer->ShadingAspect()->Aspect();
|
||||
|
||||
|
Reference in New Issue
Block a user