Improving your application
There are a lot of tricks to improve the rendering performance of applications with a large amount of data. But the essence of them is easy to understand: the smaller the number of resources (geometries, display lists, texture objects, and so on) allocated, the faster and smoother the user application is.
There are lots of ideas on how to find the bottleneck of an inefficient application. For example, you can replace certain objects by simple boxes, or replace textures in your application by 1x1 images to see if the performance can increase, thanks to the reduction of geometries and texture objects. The statistics class (osgViewer::StatsHandler
, or press the S key in the osgviewer)
can also provide helpful information.
To achieve a less-enough scene resource, we can refer to the following table and try to optimize our applications if they are not running in good shape:
Problem |
Influence |
Possible solution |
---|---|---|
Too many geometries |
Low frame rate and huge resource cost... |