Added dirty of the vertex arrays to make sure they are uploaded when using VBO + VAO's

This commit is contained in:
Robert Osfield 2016-07-11 09:46:50 +01:00
parent 483982de3a
commit 51f85f4c94

View File

@ -671,6 +671,8 @@ struct BlockDrawCallback : public virtual osg::Drawable::DrawCallback
} }
} }
vertices->dirty();
osg::DrawArrays* drawArrays = static_cast<osg::DrawArrays*>(geom->getPrimitiveSet(0)); osg::DrawArrays* drawArrays = static_cast<osg::DrawArrays*>(geom->getPrimitiveSet(0));
drawArrays->setCount(vi); drawArrays->setCount(vi);
@ -841,6 +843,8 @@ protected:
} }
} }
vertices->dirty();
_curX++; _curX++;
GraphUpdateCallback::_frameNumber = frameNumber; GraphUpdateCallback::_frameNumber = frameNumber;
@ -929,6 +933,8 @@ struct FrameMarkerDrawCallback : public virtual osg::Drawable::DrawCallback
} }
} }
vertices->dirty();
drawable->drawImplementation(renderInfo); drawable->drawImplementation(renderInfo);
} }