[osg-users] Questions about vertex and index arrays for geometry

Stephan Huber ratzfatz at digitalmind.de
Sat Oct 27 03:26:45 PDT 2007


Hi,

Andreas Goebel schrieb:
> There is still a problem: How do I tell osg::Geometry that one of the
> arrays size has chaged? It does work, of course, if I do a
> setVertexArray
> again, but if I want it to stay the same vertexArray, is there a way to 
> tell the geometry that its size has changed?
>
> In other words: I would need a function like "setVertexArraySizeDirty" .
I update the count of the corresponding primitiveSet:

osg::DrawArrays* da = 
dynamic_cast<osg::DrawArrays*>(geo->getPrimitiveSet(0));
if (da) da->setCount(vertices->size());

or something similar...

HTH,
Stephan



More information about the osg-users mailing list