Hi,

I have several images that I'm replacing on the same texture.
All works great but if I clone an image, the clone image will no display.

For example something like

_image = source().image(); // assign some image loaded from a file

...

_tex->setImage(_image.get()); // replace the texture source


Works as expected. However,


_image = dynamic_cast<Image*>(source().image()->clone(CopyOp::DEEP_COPY_ALL));

...

_tex->setImage(_image.get()); // replace the texture source


does absolutely nothing. Basically the texture will just keep on
showing the last loaded (non cloned) image.

Now, I still didn't do much debug, but I did test that the Image
member variables are the same.

Everything is equal but getAllocationMode() which is free/malloc in
the original and new/delete in the cloned, and I didn't check the
contents of data().


Am I using this wrong? For me it kind of looks right though.


Thanks

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

Reply via email to