|
|
@ -627,8 +627,8 @@ namespace MWRender
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
typedef enum
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MAPPING_CYLINDRICAL = 0,
|
|
|
|
MAPPING_SPHERICAL = 0,
|
|
|
|
MAPPING_SPHERICAL,
|
|
|
|
MAPPING_CYLINDRICAL,
|
|
|
|
MAPPING_SMALL_PLANET
|
|
|
|
MAPPING_SMALL_PLANET
|
|
|
|
} SphericalScreenshotMapping;
|
|
|
|
} SphericalScreenshotMapping;
|
|
|
|
|
|
|
|
|
|
|
@ -762,9 +762,12 @@ namespace MWRender
|
|
|
|
|
|
|
|
|
|
|
|
void RenderingManager::screenshot360(osg::Image* image)
|
|
|
|
void RenderingManager::screenshot360(osg::Image* image)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int cubeWidth = 1024;
|
|
|
|
int screenshotWidth = Settings::Manager::tryGetInt("s360 width","Video",mViewer->getCamera()->getViewport()->width());
|
|
|
|
int screenshotWidth = 1600;
|
|
|
|
int screenshotHeight = Settings::Manager::tryGetInt("s360 height","Video",mViewer->getCamera()->getViewport()->height());
|
|
|
|
int screenshotHeight = 1280;
|
|
|
|
SphericalScreenshot::SphericalScreenshotMapping mapping = static_cast<SphericalScreenshot::SphericalScreenshotMapping>(
|
|
|
|
|
|
|
|
Settings::Manager::tryGetInt("s360 mapping","Video",SphericalScreenshot::MAPPING_SPHERICAL));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int cubeWidth = screenshotWidth / 2;
|
|
|
|
SphericalScreenshot s(cubeWidth);
|
|
|
|
SphericalScreenshot s(cubeWidth);
|
|
|
|
|
|
|
|
|
|
|
|
osg::Vec3 directions[6] = {
|
|
|
|
osg::Vec3 directions[6] = {
|
|
|
@ -791,7 +794,7 @@ namespace MWRender
|
|
|
|
if (mCamera->isFirstPerson())
|
|
|
|
if (mCamera->isFirstPerson())
|
|
|
|
mPlayerAnimation->getObjectRoot()->setNodeMask(1);
|
|
|
|
mPlayerAnimation->getObjectRoot()->setNodeMask(1);
|
|
|
|
|
|
|
|
|
|
|
|
s.create(image,screenshotWidth,screenshotHeight,SphericalScreenshot::MAPPING_SPHERICAL);
|
|
|
|
s.create(image,screenshotWidth,mapping != SphericalScreenshot::MAPPING_SMALL_PLANET ? screenshotHeight : screenshotWidth,mapping);
|
|
|
|
|
|
|
|
|
|
|
|
mFieldOfView = fovBackup;
|
|
|
|
mFieldOfView = fovBackup;
|
|
|
|
}
|
|
|
|
}
|
|
|
|