Added StateSet event handler to osgfont and osgtext to aid with debugging
This commit is contained in:
parent
1590f6be3b
commit
c3b7a04cf1
@ -5,6 +5,7 @@
|
|||||||
#include <osg/Geode>
|
#include <osg/Geode>
|
||||||
#include <osgViewer/Viewer>
|
#include <osgViewer/Viewer>
|
||||||
#include <osgViewer/ViewerEventHandlers>
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
|
#include <osgGA/StateSetManipulator>
|
||||||
|
|
||||||
void textInfo(osgText::Text* text)
|
void textInfo(osgText::Text* text)
|
||||||
{
|
{
|
||||||
@ -102,6 +103,8 @@ int main(int argc, char** argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
||||||
viewer.addEventHandler(new osgViewer::StatsHandler());
|
viewer.addEventHandler(new osgViewer::StatsHandler());
|
||||||
viewer.addEventHandler(new osgViewer::WindowSizeHandler());
|
viewer.addEventHandler(new osgViewer::WindowSizeHandler());
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <osgDB/WriteFile>
|
#include <osgDB/WriteFile>
|
||||||
#include <osgDB/Registry>
|
#include <osgDB/Registry>
|
||||||
|
|
||||||
|
#include <osgGA/StateSetManipulator>
|
||||||
#include <osgViewer/Viewer>
|
#include <osgViewer/Viewer>
|
||||||
#include <osgViewer/ViewerEventHandlers>
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
|
|
||||||
@ -701,6 +702,7 @@ int main(int argc, char** argv)
|
|||||||
osgDB::writeNodeFile(*viewer.getSceneData(),"text.osg");
|
osgDB::writeNodeFile(*viewer.getSceneData(),"text.osg");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
||||||
viewer.addEventHandler(new osgViewer::StatsHandler());
|
viewer.addEventHandler(new osgViewer::StatsHandler());
|
||||||
|
|
||||||
viewer.run();
|
viewer.run();
|
||||||
|
Loading…
Reference in New Issue
Block a user