OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Binding ColorArray


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgCompute [osgCompute]
View previous topic :: View next topic  
Author Message
arielh
Newbie


Joined: 29 Nov 2009
Posts: 5

PostPosted: Sun Nov 29, 2009 2:25 pm    Post subject:
Binding ColorArray
Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> osgCompute [osgCompute] All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts osgConv tool crash when converting FB... skylook Plugins [osgPlugins] 2 Wed Oct 29, 2014 11:45 am View latest post
No new posts "Warning, can't assign attribute... Laurens Voerman Submission 1 Tue Jul 02, 2013 2:09 pm View latest post
No new posts array binding does not get set with c... robertosfield Submission 0 Tue Jul 02, 2013 9:38 am View latest post
No new posts array binding does not get set with c... Pjotr Submission 0 Tue Jul 02, 2013 9:11 am View latest post
No new posts uniform buffer object improvements: o... Tim Moore Submission 1 Sun Oct 07, 2012 9:02 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP