You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to osg-...@lists.openscenegraph.org
Hi Kedar,
On 28/06/12 19:10 , Kedar Kumbhar wrote:
> The normal method given in many examples to create a Texture2D, is using a Image file.
>
> Code:
> osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D;
> osg::ref_ptr<osg::Image> image = osgDB::readImageFile("Images/lz.rgb" );
> texture->setImage( image.get() );
>
> Instead, I have a osg::Vect4Array in which I have color information (rgba).
>
> How can I use this Vec4Array to create Texture2D?
Vec4Array is-a std::vector and contains a contiguous block of its base type, such as
float. I haven't tested this, but you should be able to just call: