Hi,
can I pass a osg::Vec3Array as uniform to Shader?
...
Thank you!
Cheers,
Rômulo
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73010#73010
___
osg-users mailing list
osg-users@lists.openscene
Hi,
I found a way to solve this problem: converting the array to texture.
Follows an example:
Code:
osg::ref_ptr image = new osg::Image;
image->setImage(myVec3Array->size(), 1, 1, GL_RGBA8, GL_RGBA, GL_FLOAT,
(unsigned char*) &myVec3Array[0], osg::Image::NO_DELETE);
osg::ref_ptr texture = ne
The three options you have are :
To use the array support in osg::Uniform that enables use of array
of Vec3, It internally manages the array so you
can't just pass in an osg::Vec3Array, by you have
setNumElements/setElement(..) methods.
To use an float RGB osg::Image like you have done
Thanks, Robert.
...
Thank you!
Cheers,
Rômulo
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73022#73022
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.or
4 matches
Mail list logo