Hi Aurelien, On 3 June 2013 10:44, Aurelien Albert <[email protected]> wrote: > IMHO, this parameter should be in the Geometry::ArrayData class (so the same > array should be used with different attrib divisor in different geometries)
I don't believe it would be sensible to use the same data in different ways, it'd have to be a pretty convoluted special case that per instance data would want to be used in a different way and shared. > The only reason I didn't add this parameter is about all the different CPU > side OSG alorithms, such as array visitors, which are used for inersection > testing, scene graph optimization, array dispatchers, etc... > > Since I don't know exactly how all these algorithms works, I'm not sure if > they should take care of the vertex attrib divisor value or not. This raises a good point, instancing isn't currently supported by the CPU OSG algorithms. It'd be very hard to support them without having the user provide some C++ callback that provides the vertex data for your based on the same processing that the shader does. Actually this applies to any vertex shader usage that modifies or computes it's own vertices. It probably is time for a general discussion on osg-users about this topic. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
