Time for action - switching between different threading models
OSG provides a very convenient interface for choosing a threading model. Different threading models can be used in different circumstances, and have different efficiencies. In this example, we are going to show the difference between three common threading models when running a scene with a huge number of quad geometries, in three rendering windows of an
- Include the necessary headers:
#include <osg/Group> #include <osgDB/ReadFile> #include <osgViewer/ViewerEventHandlers> #include <osgViewer/CompositeViewer>
- The quads can be generated with the
osg::createTexturedQuadGeometry()function. Their positions are decided simply by a random number generator. ...