Graphic3d_ArrayOfPrimitives now check the amount of vertex data rather than amount of indices.
if (theMaxEdges > 0)
{
myIndices = new Graphic3d_IndexBuffer (anAlloc);
- if (theMaxEdges < Standard_Integer(USHRT_MAX))
+ if (theMaxVertexs < Standard_Integer(USHRT_MAX))
{
if (!myIndices->Init<unsigned short> (theMaxEdges))
{
Standard_Boolean OpenGl_PrimitiveArray::processIndices (const Handle(OpenGl_Context)& theContext) const
{
if (myIndices.IsNull()
+ || myAttribs.IsNull()
|| theContext->hasUintIndex)
{
return Standard_True;
}
- if (myIndices->NbElements > std::numeric_limits<GLushort>::max())
+ if (myAttribs->NbElements > std::numeric_limits<GLushort>::max())
{
Handle(Graphic3d_Buffer) anAttribs = new Graphic3d_Buffer (new NCollection_AlignedAllocator (16));
if (!anAttribs->Init (myIndices->NbElements, myAttribs->AttributesArray(), myAttribs->NbAttributes))