Hi,
I have a scene with a "hidden" object for the person using the application to
discover and identify. What I want is a screen shot functionality which focuses
on this object but keeps the resolution of the original rendering, to be able
to analyze how many pixels the object covered when it was identified etc. I
have used the screen shot tutorial available at osgHelp to capture a screen
shot of the whole rendering:
osg::ref_ptr<osg::Image> rImage = new osg::Image;
rImage->readPixels( 0, 0, 512, 512, GL_RGB, GL_UNSIGNED_BYTE );
osgDB::writeImageFile( *rImage, "screenshot.jpg" );
What I want to do is:
osg::ref_ptr<osg::Image> rImage = new osg::Image;
rImage->readPixels( objectXmin, objectYmin, objectXmax,
objectYmax, GL_RGB, GL_UNSIGNED_BYTE );
osgDB::writeImageFile( *rImage, "screenshot.jpg" );
Can anyone give me some pointers on how to get the coordinates objectXmin and
so on?
Help is much appreciated!
Cheers,
Martin
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20920#20920
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org