hi everybody, i implemented an algorithm which generates tracks, left behind by a car which drives on a terrain. the tracks are graphically represented by arbitrary primitiveSets (triangles, quads, polygons). to prevent the system from crashing when out of memory (driving for several hours, continously generating track polygons) i used the primitiveSetList in the osg::Geometry object like a queue, inserting newly created primitiveSets at position 0 (osg::Geometry::setPrimitiveSet(0, polygon)) when maxNumPolygons is reached. a simple queue. everything worked fine, but when i decided to associate an array of vertex attributes with the vertices (storing the current frame number for each vertex which is created and using this information to create a fade out effect for the tracks in a vertex shader) i got wrong vertex attribute values when the polygon queue was filled. all the other values like texture coordinates, and vertex positions are fine. in contrary when using no polygon queue (just pushing the new polygons into the vector) the vertex attribute values are correct. could there be a problem with some kind of caching of the vertex attributes? i also use an array of texture coordinates with new values inserted every frame and the values are always correct. i don't get it. perhaps somebody experienced a similar problem and can help me.
cheers, daniel _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

