From 62208a4fd283928f82ec4396225e7b85f39c1ca6 Mon Sep 17 00:00:00 2001 From: granzuglia Date: Wed, 3 Jun 2015 14:08:22 +0000 Subject: [PATCH] - fixed "not allocated vertex buffer array" bug --- wrap/gl/trimesh.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wrap/gl/trimesh.h b/wrap/gl/trimesh.h index 95385d5b..fad1f5eb 100644 --- a/wrap/gl/trimesh.h +++ b/wrap/gl/trimesh.h @@ -1278,6 +1278,8 @@ namespace vcg { bool buffersAllocationFunction(NORMAL_MODALITY nm,COLOR_MODALITY cm,TEXTURE_MODALITY tm,const std::vector& importattribute,std::vector& attributestobeupdated) { + if (_vaohandle == NULL) + glGenVertexArrays(1,&_vaohandle); bool replicated = (importattribute[FACENORMALBO] || importattribute[FACECOLORBO] || importattribute[WEDGETEXTUREBO]); attributestobeupdated.clear(); attributestobeupdated.resize(importattribute.size());