diff --git a/examples/osgframerenderer/osgframerenderer.cpp b/examples/osgframerenderer/osgframerenderer.cpp index f710f724c..181239450 100644 --- a/examples/osgframerenderer/osgframerenderer.cpp +++ b/examples/osgframerenderer/osgframerenderer.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -407,6 +408,30 @@ int main( int argc, char **argv ) viewer.getCamera()->setReadBuffer(buffer); } + std::string outputPath = osgDB::getFilePath(fc->getOutputFileName()); + if (!outputPath.empty()) + { + osgDB::FileType type = osgDB::fileType(outputPath); + switch(type) + { + case(osgDB::FILE_NOT_FOUND): + if (!osgDB::makeDirectory(outputPath)) + { + OSG_NOTICE<<"Error: could not create directory ["<