X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscreen%2Fscreen-dump.cxx;h=ecea865933dae8f7a7e363bd0e5f8620f4261bde;hb=5f804cb0eb126ab7162855dad14d20eb381309c6;hp=5ba9f9efa5142afae684d81e8e04dc6884484bf1;hpb=3dcffc7df821bd8dfc4f4324b14f2af86305960f;p=simgear.git diff --git a/simgear/screen/screen-dump.cxx b/simgear/screen/screen-dump.cxx index 5ba9f9ef..ecea8659 100644 --- a/simgear/screen/screen-dump.cxx +++ b/simgear/screen/screen-dump.cxx @@ -75,11 +75,10 @@ bool sg_glWritePPMFile(const char *filename, GLubyte *buffer, int win_width, int } -// dump the screen buffer to a png file +// dump the screen buffer to a png file, returns true on success bool sg_glDumpWindow(const char *filename, int win_width, int win_height) { osg::ref_ptr img(new osg::Image); img->readPixels(0,0, win_width, win_height, GL_RGB, GL_UNSIGNED_BYTE); - osgDB::writeImageFile(*img, filename); - return true; + return osgDB::writeImageFile(*img, filename); }