Hello,
While using OSG version 1.20, I was taking screenshots with the following
code:
while( !viewer.done() )
{
viewer.frame();
// Here I get x, y, width and height.
osg::Image *image = new osg::Image;
image->readPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE);
osgDB::writeImageFile(*image, "capture.bmp");
}
The obtained image was correct - however, with OSG 2.2 it is not.
I am obtaining a totally black image (and it seems that x, y, width and
height are the right values).
Is there something wrong here? How do I take a screenshot of my application?
Thx!
Edu
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org