Files
OpenSceneGraph/include/osg
Robert Osfield d38fb904d3 From Maciej Krol,"With advent of GUI applications in OSG there is a growing need to redirect notification messages to third party systems. For example windows applications do not have console output, it would be appropriate to redirect notifications to GUI widget or debug output. I have revamped notification system to fit this need. New notification stream is using NotifyHandler as a message sink. Handler is called whenever stream is synchronized (i.e. after <<std::endl). Standard streams std::cout and std::cerr are no longer used although by default StandardNotifyHandler is a message sink. Custom notification handler can be set with osg::setNotifyHandler(NotifyHandler *) function.
Two implementations of NotifyHandler are currently available:
- StandardNotifyHandler, calls fputs(message, stderr) for severity <= WARN and fputs(message, stdout) for severity > WARN
- WinDebugNotifyHandler, windows users can redirect notifications to windows debug output, notifications can be viewed in output window of the debugger i.e. MSVC or DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) (see screenshot).

I have seen on osg-users that some people do std::cerr.rdbuf(otherStream.rdbuf()) to redirect notifications. This trick will no longer work since osg::notify() returns internal osg::NotifyStream not std::cout or std::cerr. You can use osg::notify().rdbuf(otherStream.rdbuf()) to do this instead.

Additionally I've made some minor fixes:
- Minor imrovements to osg::notify documentation
- NullStream could crash by deleting stream buffer other than default NullStreamBuffer in the destructor i.e. after osg::notify(osg::DEBUG_FP).rdbuf(otherStream.rdbuf())"
2009-05-18 12:04:07 +00:00
..
2009-04-22 10:46:12 +00:00
2009-03-11 15:12:46 +00:00
2009-02-11 10:41:55 +00:00
2006-07-18 15:21:48 +00:00
2006-07-18 15:21:48 +00:00
2006-07-18 15:21:48 +00:00
2006-07-18 15:21:48 +00:00
2008-12-19 12:46:21 +00:00
2006-07-18 15:21:48 +00:00
2009-01-30 10:55:28 +00:00
2007-05-14 16:16:22 +00:00
2006-07-18 15:21:48 +00:00
2008-12-17 13:14:17 +00:00
2009-01-30 10:55:28 +00:00
2008-05-12 10:16:40 +00:00
2009-03-11 15:12:46 +00:00
2009-01-30 10:55:28 +00:00
2008-03-12 20:15:45 +00:00
2006-07-18 15:21:48 +00:00
2007-07-11 16:06:04 +00:00
2006-07-18 15:21:48 +00:00
2009-01-30 10:55:28 +00:00
2008-03-12 20:15:45 +00:00
2008-07-23 15:42:02 +00:00
2008-03-12 20:15:45 +00:00
2009-01-30 10:55:28 +00:00
2006-07-18 15:21:48 +00:00
2006-07-18 15:21:48 +00:00
2009-03-04 16:15:05 +00:00
2009-01-30 10:55:28 +00:00
2008-08-18 10:47:43 +00:00
2009-01-30 10:55:28 +00:00
2009-01-30 10:55:28 +00:00
2009-01-30 10:55:28 +00:00
2008-12-17 16:13:23 +00:00
2009-01-07 10:32:59 +00:00
2006-07-18 15:21:48 +00:00
2008-10-27 13:09:43 +00:00
2008-12-17 16:13:23 +00:00
2006-07-18 15:21:48 +00:00
2006-07-18 15:21:48 +00:00
2006-07-18 15:21:48 +00:00
2006-07-18 15:21:48 +00:00
2008-12-17 15:32:35 +00:00
2009-01-30 10:55:28 +00:00