X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fscreen%2Fscreen-dump.cxx;h=ecea865933dae8f7a7e363bd0e5f8620f4261bde;hb=33970663435dd1a12941b017739285341205acf4;hp=5ba9f9efa5142afae684d81e8e04dc6884484bf1;hpb=5dfa4c0840b65377bba3224d24f2443d836e0782;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); }