Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We may not be delighted with the rendering speed of 25 fps; it means that OSG can use at most 1/25 of one second for the rendering work. And when there are more objects to render or more tasks to finish in the callbacks, the frame rate will continue to drop down and makes the whole process inefficient.
One solution is to use an independent thread for OSG traversals and drawing commands. Of course, the OpenThreads library, which is included in the core OSG source code, is the best choice for implementing such a job. But as we are working with Qt too, we will try the the Qt threading class here. The code will be based on the Integrating OSG with Qt recipe and only have a few modifications.