Hello,

the following code block is creating an image from a buffer I own. This
does not allocate a new buffer, but assumes my buffer will not be
deallocated. How do I create a new, independent osg::Image copying data
from my buffer to an internal array?

osg::Image img = osg::image();
img->setImage(
  width,
  height,
  1,
  internalTextureFormat(),
  type(),
  MyDataBuffer(),
  osg::Image::NO_DELETE);
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to