From: kgv Date: Fri, 19 Apr 2013 12:33:05 +0000 (+0400) Subject: 0023917: Primitive Array with reserved but unused Edges array drawn corrupted from VBO X-Git-Tag: V6_7_0_beta~283 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=ee1e83b94b05b453a7bdf1215c5a7ba80324c804;p=occt-copy.git 0023917: Primitive Array with reserved but unused Edges array drawn corrupted from VBO --- diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index 8e71c6a3a9..02a14a6db0 100755 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -85,7 +85,8 @@ Standard_Boolean OpenGl_PrimitiveArray::BuildVBO (const Handle(OpenGl_Workspace) return Standard_False; } - if (myPArray->edges != NULL) + if (myPArray->edges != NULL + && myPArray->num_edges > 0) { myVbos[VBOEdges] = new OpenGl_IndexBuffer(); if (!myVbos[VBOEdges]->Init (aGlCtx, 1, myPArray->num_edges, (GLuint* )myPArray->edges))