Hi Umit,

Texture3D simply doesn't have a constructor that allows you to pass in
an Image object like Texture2D, you'll need to call
texture3D->setImage(image); instead.

Since this is an inconsitency in the interface I am adding and
Texture1D(Image*), Texture3D(Image*) constructors, but this will only
be available in svn/trunk and 2.7.3 onwards.

Robert.

On Wed, Oct 8, 2008 at 10:37 AM, Ümit Uzun <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am trying to create shader texture with noise. And try to read
> NoiseVolume.dds formatted image from file as
>
>     osg::ref_ptr<osg::Image> image0
> (osgDB::readImageFile("NoiseVolume.dds"));
>     osg::ref_ptr<osg::Texture3D> tex0 (new osg::Texture3D(image0.get()));
>
> but when I try to create Texture3D, compiler gives me error like this;
>
> error C2664: 'osg::Texture3D::Texture3D(const osg::Texture3D &,const
> osg::CopyOp &)' : cannot convert parameter 1 from 'osg::Image *' to 'const
> osg::Texture3D &'
>
> I have look at the examples about Texture3D and noise (osgTexture3D,
> osgVolume and osgShaders) so I realized that there aren't any Texture3D
> loaded from disk. All examples create their image3d on the fly. My question
> is this, Isn't there any way load our image3d from file? Do I have to create
> my 3d noise image on the fly?
>
> Best Regards.
>
> Umit Uzun
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to