Home > other >  S w t osg when debugging etc. Display status information is invalid
S w t osg when debugging etc. Display status information is invalid

Time:10-01

Could you tell me how to to reality in osg debugging in osgviewer can display information, such as frames

CodePudding user response:

Viewer. AddEventHandler (new osgGA: : StateSetManipulator (viewer. The getCamera () - & gt; GetOrCreateStateSet ()));

//window size change event
Viewer. AddEventHandler (new osgViewer: : WindowSizeHandler);

//add some commonly used state
Viewer. AddEventHandler (new osgViewer: : StatsHandler);

//after setting the above, can realize the following functions
//click S will display frame rate
//click W will show the grid
//click F will flow from and to minimize the change of back and forth between
//click on L will show light


================================
Attention to the problem of switch to input method
  • Related