This bug is fixed in the trunk of osgEarth, try pulling and retest.

Thanks,

Jason

On Mon, Apr 23, 2012 at 10:33 AM, Ou Yang <vrcraze2...@gmail.com> wrote:

> Hi,
>
> The bug has been found in ImageOverlay::init() method.
> The original code is:
>    osg::Vec4Array* colors = new osg::Vec4Array(1);
>    (*colors)[0] = osg::Vec4(1,1,1,_alpha);
>
>    geometry->setColorArray( colors );
>    geometry->setColorBinding( osg::Geometry::BIND_OVERALL );
>
> when change it to:
>    osg::Vec4Array* colors = new osg::Vec4Array(4);
>    (*colors)[0] = osg::Vec4(1,1,1,_alpha);
>        (*colors)[1] = osg::Vec4(1,1,1,_alpha);
>        (*colors)[2] = osg::Vec4(1,1,1,_alpha);
>        (*colors)[3] = osg::Vec4(1,1,1,_alpha);
>
>    geometry->setColorArray( colors );
>    geometry->setColorBinding( osg::Geometry::BIND_PER_VERTEX );
> the alpha value are applied correctly.
>
> I don't know if it a bug in osg core library.
> ...
>
> Thank you!
>
> Cheers,
> Ou
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=47225#47225
>
>
>
>
>
> _______________________________________________
> 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