From: Thomas Geymayer Date: Sun, 27 Jul 2014 10:11:09 +0000 (+0200) Subject: Canvas: warn for missing tff and png plugins. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=64ac22f50c8c9779ecd073cdf9f34c0f6bd0dc7e;p=simgear.git Canvas: warn for missing tff and png plugins. --- diff --git a/simgear/canvas/elements/CanvasImage.cxx b/simgear/canvas/elements/CanvasImage.cxx index 20d19908..c7ca43d0 100644 --- a/simgear/canvas/elements/CanvasImage.cxx +++ b/simgear/canvas/elements/CanvasImage.cxx @@ -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"); } //---------------------------------------------------------------------------- diff --git a/simgear/canvas/elements/CanvasText.cxx b/simgear/canvas/elements/CanvasText.cxx index 6ef37819..ebe76d41 100644 --- a/simgear/canvas/elements/CanvasText.cxx +++ b/simgear/canvas/elements/CanvasText.cxx @@ -21,6 +21,7 @@ #include #include #include +#include #include 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"); } //----------------------------------------------------------------------------