Hi,
try attach before frame. I'm not sure why you want to call frame
yourself, is this part of a larger app?
jp
Danny Lesnik wrote:
Hi,
I tried the following code
Code:
osg::ref_ptr<osg::Image> shot = new osg::Image();
shot->allocateImage(640, 480, 24, GL_RGB, GL_UNSIGNED_BYTE);
osg::ref_ptr<osg::Camera> camera = _viewer->getCamera();
_viewer->frame();
camera->attach(osg::Camera::COLOR_BUFFER, shot.get());
osgDB::writeImageFile(*shot, "test.png" );
but still black image. How can I solve the issue.
Thank you!
Cheers,
Danny
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23033#23033
_______________________________________________
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