Hi,
I learned from the example about MotionBlur in OSG,then I realized it.But when
I tried to get a snapshot of the screen,I can not get the motion effect,it was
just a normal one. The way that I get the snapshot is,
Code:
struct CaptuerDrawCallBack:public osg::Camera::DrawCallback
{
CaptuerDrawCallBack(osg::ref_ptr<osg::Image>image)
{
_image=image;
}
~CaptuerDrawCallBack(){}
virtual void operator()(const osg::Camera& camera)const
{
osg::ref_ptr<osg::GraphicsContext::WindowingSystemInterface>win;
_image->allocateImage(720,576,1,GL_RGBA,GL_UNSIGNED_BYTE);
_image->readPixels(0,0,720,576,GL_RGBA,GL_UNSIGNED_BYTE);
//osgDB::writeImageFile((*_image.get()),"imageosg.bmp");
pData=_image->data();
}
osg::ref_ptr<osg::Image>_image;
};
I added a callback onto the camera.How can I get a snapshot of the motion blur
effect?
Thank you!
Cheers,
Duan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41836#41836
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org