- OpenSceneGraph 3.0: Beginner's Guide
- Rui Wang Xuelei Qian
- 201字
- 2021-03-27 00:35:43
Tracing with the notifier
The OSG notifier mechanism provides a novel method of outputting verbose debugging messages, either from the OSG rendering backend or from the user level. It is really an important and time-honored method for tracing and debugging programs. In addition, the notifier is also used throughout the OSG core functionalities and plugins to show errors, warning messages, or information about the work in progress. Developers may simply insert debugging print functions liberally in the source code files. The print function, osg::notify()
, is designed to accept different levels of messages and send them to the console or user-defined controllers.
The osg::notify()
function can be used as the standard output stream std::cout
. It requires a NotifySeverity
argument to indicate the message level, which can be ALWAYS, FATAL, WARN, NOTICE, INFO, DEBUG_INFO
, and DEBUG_FP
, sorted from the most severity to the least. For instance:
osg::notify(osg::WARN) << "Some warn message." << std::endl;
This will print out a line of the warning message by default. Here osg::WARN
is used to indicate the notify level to the OSG notifier system.
A series of macro definitions, such as OSG_FATAL, OSG_WARN
, and OSG_NOTICE
, will do the same work as the osg::notify()
function, with different severity levels.
- RAW攝影后期從入門到精通:Photoshop+Lightroom雙修精解
- iPad+Procreate數(shù)字插畫設(shè)計(jì)案例教程(全彩微課版)
- 持續(xù)演進(jìn)的Cloud Native:云原生架構(gòu)下微服務(wù)最佳實(shí)踐
- Painter繪畫實(shí)例教程
- PowerPoint 2019從入門到精通(移動(dòng)學(xué)習(xí)版)
- Joomla! Social Networking with JomSocial
- 3ds Max/MaxScript印象 腳本動(dòng)畫制作基礎(chǔ)與應(yīng)用
- Illustrator平面設(shè)計(jì)立體化教程:Illustrator 2021(微課版)
- Premiere Pro影視后期編輯:短視頻制作實(shí)戰(zhàn)寶典
- ICEfaces 1.8: Next Generation Enterprise Web Development
- jQuery 1.3 with PHP
- OpenVPN 2 Cookbook
- 中文版Illustrator CS6基礎(chǔ)培訓(xùn)教程(第2版)
- 管家婆軟件實(shí)戰(zhàn)操作教程(輝煌版)
- Photoshop數(shù)字創(chuàng)意設(shè)計(jì)教程(案例微課版)