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

Andreas Goebel a-goebel at gmx.de
Sat Oct 27 03:18:05 PDT 2007


Hi,


> If I have four vertices, is it as easy as pushing back numbers 0, 1, 2, 
> 1, 2, 3 to the index-array and I get two triangles sharing vertices 1 
> and 2? And does the geometry use the index-array automatically if there 
> is one? Because at the moment I don´t have an index-array and the 
> geometry just uses all the vertices.
>
>   
This worked as I expected, no problem here.
> And if so, how can I change the size of the index array? Do I have to 
> resize the std::vector containing the indices, or is there a way of 
> telling osg::geometry about how many indices should be used?
>
>   
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" .

Regards,

Andreas
> Regards,
>
> Andreas
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>   




More information about the osg-users mailing list