mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -257,22 +257,8 @@ void OpenGl_CappingAlgo::Init()
|
||||
// =======================================================================
|
||||
Standard_Boolean OpenGl_CappingAlgoFilter::CanRender (const OpenGl_Element* theElement)
|
||||
{
|
||||
const OpenGl_PrimitiveArray* aPArray =
|
||||
dynamic_cast<const OpenGl_PrimitiveArray*> (theElement);
|
||||
if (!aPArray)
|
||||
return Standard_False;
|
||||
|
||||
switch (aPArray->PArray()->type)
|
||||
{
|
||||
case TelPolygonsArrayType :
|
||||
case TelTrianglesArrayType :
|
||||
case TelQuadranglesArrayType :
|
||||
case TelTriangleStripsArrayType :
|
||||
case TelQuadrangleStripsArrayType :
|
||||
case TelTriangleFansArrayType :
|
||||
return Standard_True;
|
||||
|
||||
default:
|
||||
return Standard_False;
|
||||
}
|
||||
const OpenGl_PrimitiveArray* aPArray = dynamic_cast<const OpenGl_PrimitiveArray*> (theElement);
|
||||
return aPArray != NULL
|
||||
&& aPArray->DrawMode() >= GL_TRIANGLES
|
||||
&& aPArray->DrawMode() <= GL_POLYGON;
|
||||
}
|
||||
|
Reference in New Issue
Block a user