Hi,
I am not sure if I am missing something obvious here , but in the 2.8.3
implementation of Geometry::drawImplementation
There is a loop over primitive types as abridged below
Code:
for(DrawElementsUInt::const_iterator primItr=drawElements->begin();
primItr!=drawElements->end();
++primCount,++primItr)
{
....
....
if ( extensions->isVertexProgramSupported() )
{
DrawVertexAttribList &list =
drawVertexAttribMap[BIND_PER_VERTEX];
for( unsigned int i = 0; i < list.size(); ++i )
{
list[i]->applyAndIncrement();
}
}
}
What this suggests to me ( and what I am seeing ) is that in the body of the
loop over primitives , then for each [BIND_PER_VERTEX] attribute list,
applyAndIncrement will be called - this increments the index_ member of the
DrawVertexAttribList .
BIND_PER_VERTEX attribute arrays will have a size to the number of vertices.
If the number of primitives is greater than the number of vertices, then a
vector[] out of bounds exception on the vertex attribute array will happen when
the primCount exceeds the vertex count.
Thank you!
Cheers,
Andrew
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44004#44004
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org