Hi all, I'm trying to figure out the best method to pass per vertex "attributes" to shaders using osg and I can't seem to find many examples of attribute use. My guess is there's a reason for that and I should probably code up a uniform array of some kind instead. I need to pass "thickness" as an "attribute" and that varies with the geometry / osg::Geode. I've studied the osg::Drawable and its attribute types, and the osg::Program and its addBindAttribLocation, but I can't find any examples of the callback or other mechanism to actually get the data set into the attributes from the scenegraph. I must be missing something, and I'm really new at this shader stuff. Can anybody point me in the right direction? Should I not try to use shader attributes, but instead use a uniform array and look up my data in there? If I do use shader attributes, where's an example?
Thanks for the help, Bob
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

