#ifndef MWRENDER_SCREENSHOTMANAGER_H #define MWRENDER_SCREENSHOTMANAGER_H #include #include #include #include namespace Resource { class ResourceSystem; } namespace MWRender { class Water; class NotifyDrawCompletedCallback; class ScreenshotManager { public: ScreenshotManager(osgViewer::Viewer* viewer, osg::ref_ptr rootNode, osg::ref_ptr sceneRoot, Resource::ResourceSystem* resourceSystem, Water* water); ~ScreenshotManager(); void screenshot(osg::Image* image, int w, int h); bool screenshot360(osg::Image* image); private: osg::ref_ptr mViewer; osg::ref_ptr mRootNode; osg::ref_ptr mSceneRoot; osg::ref_ptr mDrawCompleteCallback; Resource::ResourceSystem* mResourceSystem; Water* mWater; void traversalsAndWait(unsigned int frame); void renderCameraToImage(osg::Camera* camera, osg::Image* image, int w, int h); void makeCubemapScreenshot( osg::Image* image, int w, int h, const osg::Matrixd& cameraTransform = osg::Matrixd()); }; } #endif