Hi opensg users,

 

i am working to a cluster/server application.

I would like to take screenshots of what is being rendered

On the remote windows,

so I attached to the viewport a GrabForegroundPtr.

 

The problem is that when I try to save the grabbed image,

it is empty. 

 

fgndImage->setActive(true);

      m_pMgr->redraw();                              // render pass

fgndImage->setActive(false);

 

// get foreground image

beginEditCP(fgndImage, GrabForeground::ImageFieldMask);

      ImagePtr img = fgndImage->getImage();

endEditCP(fgndImage, GrabForeground::ImageFieldMask);

 

//get pixel data

beginEditCP(fgndImage, Image::PixelFieldMask);

      UInt8 *imageData = img->getData();

      int width  = img->getWidth();

      int height = img->getHeight();

endEditCP(fgndImage, Image::PixelFieldMask);

 

Does anyone has any clue?

 

Thanks

E.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to