Hi Sajjadul,

On 4/03/11 18:13 , Sajjadul Islam wrote:
> I need to construct a 3D Texture and fill it with the magnitudes of the 
> displacements.
> 
> I looked into the class Texture3D . But i did not find any operator or 
> function
> that let us to set the value at certain position in the texture as follows:
> 
> img(x,y,z) = value.

You can't modify the Texture, but you can modify the associated Image which 
will then be
uploaded into the texture.

It doesn't look like there is an accessor for x,y,z (only x,y) but you can get 
the data
pointer (osg::Image::data) and work out the offset yourself.

Don't forget to call 'osg::Image::dirty()' when you're done so that it's 
uploaded.

Cheers,
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to