Hi,
I try to expand the ptclParticleDemo.I want to add a color array and change the
color in cuda program.
I try to "bind" the colorArray but i not sure hown to:
osg::Vec4Array *colors = new osg::Vec4Array(numParticles);
ptclGeom->setColorArray(colors);
ptclGeom->setColorBinding(osg::Geometry::BIND_PER_VERTEX);
osg::ref_ptr<osgCuda::Array> colorArray = new osgCuda::Array;
colorArray->setArray(colors);
colorArray->setName("colors");
srcArray->setElementSize(sizeof(osg::Vec4f));
srcArray->setDimension(0,numParticles);
srcArray->addHandle("PTCL_COLOR_BUFFER");
computation->addResource( *srcArray);
But not work properly.
Some One can help me???
Cheers,
Ariel
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20529#20529
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org