Hi arielh,

For this purpose you cannot make use of osgCuda::Arrays because buffers of this 
type are read-only. In order to add a color entry for each vertex you have to 
expand your osgCuda::Geometry object by an additional color array of type 
osg::Vec4Array=> myGeometry->setColorArray( new osg::Vec4Array ). The vertex 
buffer object of this geometry is then extended by the respective color data. 
During your computation you need to know this offset to address the color data 
(In your case this should be something like "sizeof(Vec4f) * numVertices").   


I hope this information will help you. 

Cheers,
Jens

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20613#20613





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to