[osg-users] Material and SetTrasparancy

2011-03-25 Thread Andrea Martini
Hi, i'm looking for give to an 3d object, some transparent value (not completely transparency) . So, i'm starting from osgclip example, to make trasparent (with 0.5 opacity) the wireframe part of the cow. part of the c++ code : osg::Node* decorate_with_clip_node(osg::Node* subgraph) { ...

Re: [osg-users] Material and SetTrasparancy

2011-03-25 Thread Andrea Martini
Hi, I solved. The Problem is a null pointer of material, after : osg::Material * material = (osg::Material *) wireframe_subgraph-getOrCreateStateSet()-getAttribute(osg::StateAttribute::MATERIAL); command. I solved simply in this way : osg::Material * material = new osg::Material();