diff --git a/include/osg/Notify b/include/osg/Notify index 46fca135d..194c268a0 100644 --- a/include/osg/Notify +++ b/include/osg/Notify @@ -75,6 +75,15 @@ extern OSG_EXPORT std::ostream& notify(const NotifySeverity severity); inline std::ostream& notify(void) { return notify(osg::INFO); } +#define NOTIFY(level) if (level>isNotifyEnabled(level)) osg::notify(level) + +#if _DEBUG + #define DEBUG_NOTIFY(level) if (level>isNotifyEnabled(level)) osg::notify(level) +#else + // when using an optimized build use if (false) to tell the compiler to ignore the rest of the notify. + #define DEBUG_NOTIFY(level) if (false) osg::notify(level) +#endif + /** Handler processing output of notification stream. It acts as a sink to * notification messages. It is called when notification stream needs to be * synchronized (i.e. after osg::notify() << std::endl).