Hi Julien,

Julien Valentin wrote:
Okay, i have correct it by a second attachment from the camera
colorbuffer to....the image already attached to the output rtt
texture...:(

Code: _prerenderCamera[i]->attach(osg::Camera::BufferComponent(osg::Camera::COLOR_BUFFER),
_RTTOutTexture->getImage());



I don't think it's nice ....I haved try a

Code: osg::Image *im=outputtexture->getImage(); im->readPixels(0,0,im->s(),im->t(),GL_RGBA, GL_UNSIGNED_BYTE);


in a osg::Camera::DrawCallback but it seems to fails: it read the
mainview in the osg::Image and not the prerendertotexture results...

I think the reason why you are not getting more response is that no-one understands what you are trying to do...


Is there anyone who knows how to readback properly a osg::Texture2D
in a osg::Image after a RTT pass?

Yes, look at osgprerender. We use many examples of this without problem, just attach the osg::Image to the RTT camera.

jp


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





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



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

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

Reply via email to