Use osg::BlendFunc attribute to enable transparency and attach it to a State of the Cone.
ae Whang wrote: > > Hello, I have a problem while using OSG. > > I searched in google but can not find the answer so I am posting a > Question here. > > > I want to add a transparent model into the scenegraph... > > I am using Geode, addDrawable, ShapeDrawable, cone to create and add a > cone in to the scenegraph > > So I have cone sitting in the middle of screen. > > So I defined new material and setAlpha to > (osg::Material::FRONT_AND_BACK, 0.5f); > > defined new StateSet and setAttribute with above material > > then setStateSet the geode with the defined StateSet. > > It did not work. > > So instead of setAlpha, I used setTransparency > (osg::Material::FRONT_AND_BACK, 0.5f); > > However it still does not work. > > > Could please point me in right direction? > or tell me what I am doing wrong? > > > I want the Cone to look like made with a glasses > > So the user can see the objects behind it > > Thanks in advance > > Jae > > ------------------------------------------------------------------------ > Explore the seven wonders of the world Learn more! > <http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE> > > ------------------------------------------------------------------------ > > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
