Re: [osg-users] Save Texture2D to disk

2012-01-22 Thread Robert Osfield
Hi Sean,

There is a osg::Image::readImageFromCurrentTexture(..) method that you
could use, you'll need to do the call within a graphics thread, such
as by using an draw callback, and as the method reads from the current
OpenGL texture you'll need to do a texture->apply(..) prior to calling
image->readImageFromCurrentTexture(..).

Robert.

On 20 January 2012 18:10, Sean O'Connell  wrote:
> I'm using a 3rd party library that returns a Texture2D object that represents 
> a snapshot of the scene.  However they don't attach an Image object to it.  
> How can I retrieve the pixel data in the Texture2D object and save to disk?  
> I don't see any accessor methods in either Texture2D or Texture that allow me 
> to do this.
>
> Thanks.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=44946#44946
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Save Texture2D to disk

2012-01-20 Thread Sean O'Connell
I'm using a 3rd party library that returns a Texture2D object that represents a 
snapshot of the scene.  However they don't attach an Image object to it.  How 
can I retrieve the pixel data in the Texture2D object and save to disk?  I 
don't see any accessor methods in either Texture2D or Texture that allow me to 
do this.

Thanks.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44946#44946





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org