Hi Nicolas,

You need to  enable the blending as well for the desired effect. What
you need to do is to get the StateSet of the shape drawable and set the
mode for blending.
You need to do some thing like this.
shapeDrawable->getOrCreateStateSet()->setMode(GL_BLEND,
osg::StateAttribute::ON);

cheers
rj

nicolas peña wrote:
> Hi all,
>
>           I have and osg::Box that is drawn using a osg::ShapeDrawable
> and I want to make it transparent.
> I have tried using the setColor method of the osg::ShapeDrawable as I
> understand that the fourth value
> of the vector passed to it is used to set the alpha value, but it 
> looks like I need to enable the
> transparency somewhere else has it is just use the RGB components of
> the passed vector and draw
> a solid Box.
> Where can I enable the transparency for the box? Or what I need to do?
>
>
> Thanks,
>
>         Nicolas.
> ------------------------------------------------------------------------
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>   

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

Reply via email to