- fixed "not allocated vertex buffer array" bug

This commit is contained in:
granzuglia 2015-06-03 14:08:22 +00:00
parent c8004cf4ad
commit 62208a4fd2
1 changed files with 2 additions and 0 deletions

View File

@ -1278,6 +1278,8 @@ namespace vcg {
bool buffersAllocationFunction(NORMAL_MODALITY nm,COLOR_MODALITY cm,TEXTURE_MODALITY tm,const std::vector<bool>& importattribute,std::vector<bool>& attributestobeupdated)
{
if (_vaohandle == NULL)
glGenVertexArrays(1,&_vaohandle);
bool replicated = (importattribute[FACENORMALBO] || importattribute[FACECOLORBO] || importattribute[WEDGETEXTUREBO]);
attributestobeupdated.clear();
attributestobeupdated.resize(importattribute.size());