Re: [osg-users] Problem with osgEarth::ImageOverlay::setAlpha

2012-04-27 Thread Jason Beverage
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  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


Re: [osg-users] Problem with osgEarth::ImageOverlay::setAlpha

2012-04-23 Thread Ou Yang
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


Re: [osg-users] Problem with osgEarth::ImageOverlay::setAlpha

2012-02-21 Thread Glenn Waldron
Yes, appears to be malfunctioning. I will open an issue for it...thanks.
http://github.com/gwaldron/osgearth/issues/66


Glenn Waldron / @glennwaldron


On Wed, Feb 8, 2012 at 11:38 AM, Ou Yang  wrote:

> Hi,
>
> I use osgEarth::ImageOverlay::setAlpha(float alpha) to change the
> transparency of images, which was draped on terrain, just like what google
> earth does, but this method seems has no effect at all! It also doesn't
> work in the sample osgearth_imageoverlay. Is it a bug?
> I use openscenegraph 3.0.0 and osgearth 2.1.1, build with visual studio
> 2010.
>
>
> Thank you!
>
> Cheers,
> Ou
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=45341#45341
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/1_538.jpg
>
>
> ___
> 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


Re: [osg-users] Problem with osgEarth::ImageOverlay::setAlpha

2012-02-21 Thread Chris Hanson
>
> I use osgEarth::ImageOverlay::setAlpha(float alpha) to change the
> transparency of images, which was draped on terrain, just like what google
> earth does, but this method seems has no effect at all! It also doesn't
> work in the sample osgearth_imageoverlay. Is it a bug?
> I use openscenegraph 3.0.0 and osgearth 2.1.1, build with visual studio
> 2010.
>
>
You will probably get wider exposure for this on the osgEarth forums:

http://forum.osgearth.org/

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org