Improving frame rate performance
You will encounter issues when your frame rate becomes very low or, even worse, when you receive error messages like the one shown in the following screenshot:
Figure 12.8: One of the most hateful error messages you can get: out of memory!
Let’s examine the potential causes.
Draw calls
A draw call is a command that tells the GPU to draw a specific object. The more draw calls your application makes, the more work the CPU has to do to send the commands to the GPU, which can lead to lower frame rates.
The number of draw calls your application uses depends on the number of unique meshes in your scene, as well as the number of unique material IDs each mesh is using. For example, if you have a scene with 100 meshes, each using a different material ID, your application will make 100 draw calls. By reducing the number of draw calls in your application, you can improve its graphical performance. This can be done...