[osg-users]  Allocating osg::image from my own data buffer
    Bruno Oliveira 
    bruno.manata.oliveira at gmail.com
       
    Mon Aug 22 13:46:49 PDT 2016
    
    
  
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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160822/d41de920/attachment-0002.htm>
    
    
More information about the osg-users
mailing list