1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-06 04:45:32 +00:00

taking anyoldname3 review comments to heart; typo fixes plus rebase

This commit is contained in:
Bret Curtis 2020-04-22 20:29:50 +02:00
parent 1cd4b9ee68
commit c359406473
3 changed files with 4 additions and 4 deletions

View file

@ -995,7 +995,7 @@ namespace MWRender
osg::ref_ptr<osg::Image> mImage; osg::ref_ptr<osg::Image> mImage;
}; };
void RenderingManager::screenshotScreen(osg::Image* image, int w, int h) void RenderingManager::screenshotFramebuffer(osg::Image* image, int w, int h)
{ {
osg::Camera* camera = mViewer->getCamera(); osg::Camera* camera = mViewer->getCamera();
osg::ref_ptr<osg::Drawable> tempDrw = new osg::Drawable; osg::ref_ptr<osg::Drawable> tempDrw = new osg::Drawable;
@ -1009,7 +1009,7 @@ namespace MWRender
mViewer->updateTraversal(); mViewer->updateTraversal();
mViewer->renderingTraversals(); mViewer->renderingTraversals();
callback->waitTillDone(); callback->waitTillDone();
// now that we've "used up" the current frame, get a fresh framenumber for the next frame() following after the screenshot is completed // now that we've "used up" the current frame, get a fresh frame number for the next frame() following after the screenshot is completed
mViewer->advance(mViewer->getFrameStamp()->getSimulationTime()); mViewer->advance(mViewer->getFrameStamp()->getSimulationTime());
camera->removeChild(tempDrw); camera->removeChild(tempDrw);
camera->setFinalDrawCallback(nullptr); camera->setFinalDrawCallback(nullptr);

View file

@ -144,8 +144,8 @@ namespace MWRender
void setWaterHeight(float level); void setWaterHeight(float level);
/// Take a screenshot of w*h onto the given image, not including the GUI. /// Take a screenshot of w*h onto the given image, not including the GUI.
void screenshotScreen(osg::Image* image, int w, int h); // copie directly from framebuffer and scale to given size
void screenshot(osg::Image* image, int w, int h, osg::Matrixd cameraTransform=osg::Matrixd()); // make a new render at given size void screenshot(osg::Image* image, int w, int h, osg::Matrixd cameraTransform=osg::Matrixd()); // make a new render at given size
void screenshotFramebuffer(osg::Image* image, int w, int h); // copy directly from framebuffer and scale to given size
bool screenshot360(osg::Image* image, std::string settingStr); bool screenshot360(osg::Image* image, std::string settingStr);
struct RayResult struct RayResult

View file

@ -2554,7 +2554,7 @@ namespace MWWorld
void World::screenshot(osg::Image* image, int w, int h) void World::screenshot(osg::Image* image, int w, int h)
{ {
mRendering->screenshotScreen(image, w, h); mRendering->screenshotFramebuffer(image, w, h);
} }
bool World::screenshot360(osg::Image* image, std::string settingStr) bool World::screenshot360(osg::Image* image, std::string settingStr)