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());