2021-01-08 19:33:51 +04:00
|
|
|
#ifndef MWRENDER_SCREENSHOTMANAGER_H
|
|
|
|
#define MWRENDER_SCREENSHOTMANAGER_H
|
|
|
|
|
|
|
|
#include <osg/ref_ptr>
|
|
|
|
|
|
|
|
#include <osgViewer/Viewer>
|
|
|
|
|
|
|
|
namespace MWRender
|
|
|
|
{
|
2021-05-16 13:04:30 +02:00
|
|
|
class NotifyDrawCompletedCallback;
|
2021-01-08 19:33:51 +04:00
|
|
|
|
|
|
|
class ScreenshotManager
|
|
|
|
{
|
|
|
|
public:
|
2024-06-06 11:23:05 +03:00
|
|
|
ScreenshotManager(osgViewer::Viewer* viewer);
|
2021-05-16 13:04:30 +02:00
|
|
|
~ScreenshotManager();
|
2021-01-08 19:33:51 +04:00
|
|
|
|
|
|
|
void screenshot(osg::Image* image, int w, int h);
|
|
|
|
|
|
|
|
private:
|
|
|
|
osg::ref_ptr<osgViewer::Viewer> mViewer;
|
2021-05-16 13:04:30 +02:00
|
|
|
osg::ref_ptr<NotifyDrawCompletedCallback> mDrawCompleteCallback;
|
2021-01-08 19:33:51 +04:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|