Let me add some more detail/info to my question....

I am using RTT to create/modify a set of textures... actually a osg::TextureCubeMap....
I am taking this TextureCubeMap and projecting it onto an object.
After I project the CubeMap onto the object I want peel this texture, or surface of the object, off as a single texture.

On 2014-08-07 08:49, Paul Martz wrote:
If you are creating/modifying the textures in shaders, then you must
be rendering to texture using an FBO. Are you doing this with an
osg::Camera? If so, then you already have an osg::Texture attached to
your osg::Camera, right?

You said you need them in an osg::Texture. Why? Are you actually
saying that you need a copy of the texture image data in host memory?

If you attach an osg::Image as the color attachment for your
osg::Camera, it will automatically do a glReadPixels to read the
rendered image data into the osg::Image's host memory buffer.

If you're not using any OSG constructs to create / modify the OpenGL
texture object, then just use OpenGL calls to read the texel data from
GPU back to host, and create an osg::Image / osg::Texture object with
that texel data..

On Thu, Aug 7, 2014 at 8:36 AM, Conan <[email protected]> wrote:

Hi,

I need to pull the texture(s) off an object after each rendered
frame and put them in an osg::Texture*... (Not sure I said that all
correctly, but...)  these textures are not loaded with the original
geometry, are not in files, etc.  They are generated at startup and
attached and modified through shaders each frame.

I assume I need to use a post draw camera callback, but I am not
sure how to get the textures since they don't have a filename
associated with them in the stateset.

Any suggestions?

CD
_______________________________________________
osg-users mailing list
[email protected]

http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[1]

--

   -Paul



Links:
------
[1] 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
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to