Canvas: warn for missing tff and png plugins.

This commit is contained in:
Thomas Geymayer
2014-07-27 12:11:09 +02:00
parent 719ee36f5c
commit 64ac22f50c
2 changed files with 9 additions and 0 deletions

View File

@@ -100,6 +100,10 @@ namespace canvas
addStyle("preserveAspectRatio", "", &Image::setPreserveAspectRatio);
addStyle("slice", "", &Image::setSlice);
addStyle("slice-width", "", &Image::setSliceWidth);
osgDB::Registry* reg = osgDB::Registry::instance();
if( !reg->getReaderWriterForExtension("png") )
SG_LOG(SG_GL, SG_ALERT, "canvas::Image: Missing 'png' image reader");
}
//----------------------------------------------------------------------------

View File

@@ -21,6 +21,7 @@
#include <simgear/canvas/CanvasSystemAdapter.hxx>
#include <simgear/scene/util/parse_color.hxx>
#include <osg/Version>
#include <osgDB/Registry>
#include <osgText/Text>
namespace simgear
@@ -582,6 +583,10 @@ namespace canvas
addStyle("font", "", &Text::setFont);
addStyle("alignment", "", &Text::setAlignment);
addStyle("text", "", &Text::setText, false);
osgDB::Registry* reg = osgDB::Registry::instance();
if( !reg->getReaderWriterForExtension("ttf") )
SG_LOG(SG_GL, SG_ALERT, "canvas::Text: Missing 'ttf' font reader");
}
//----------------------------------------------------------------------------