Hi Don!

I think that you can try enabling GL_BLEND mode in your StateSet (if
it is not already enabled).

Best regards,
Yurii Monakov

2010/12/16 Don Leich <d...@ilight.com>:
> Hi all,
>
> I've got a problem that I haven't been able to find a solution
> for and could use some help.  I'm using the standard texture file
> "OpenSceneGraph-Data/Images/sphere.gif" as the source image for
> point sprites.  The file is an image of a shaded sphere against
> a fully transparent background.
>
> I can set a state to properly render small 2-D sphere images with
> GL_POINTS primitive type.  I needed to add sprites to my scene
> graph after some other content that requires setting a different
> state first.  The point sprites after this other content will show
> the shaded sphere image correctly, but will now also render the
> sphere image background even though it should be fully transparent.
>
> Adding osg::StateAttribute::OVERRIDE to the blend function state
> was a thought, but no help.
>
>    fn->setFunction(osg::BlendFunc::SRC_ALPHA,
>        osg::BlendFunc::ONE_MINUS_SRC_ALPHA);
>
>    _state->setAttributeAndModes(fn,
>        osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
>
> A dump and compare of .osg files didn't yield any insight.  Does
> anyone have a suggestion for a possible fix here or maybe a way
> to debug the state with OSG internals?  What besides BlendFunc
> should be in influence here?  Does it sound like I'm just not
> applying the state where I think I am?
>
> Thanks,
> -Don Leich
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to