Integrating Tracy into C++ applications
In the previous chapter, Working with Vulkan Objects, we learned how to write small graphics applications with Vulkan and LightweightVK. In real-world applications, it is often necessary to be able to quickly get performance profiling information at runtime. In this recipe, we will show how to make use of the Tracy profiler in your 3D applications.
Getting ready
The complete source code of the demo application for this recipe is located in Chapter04/02_TracyProfiler
.
Make sure to download a precompiled Tracy client app for your platform from https://github.com/wolfpld/tracy. In our book, we use Tracy version 0.11.1.
How to do it...
The Tracy profiler itself is integrated into the LightweightVK library. Our demo application, as well as many parts of the LightweightVK rendering code, is augmented with calls to profiling functions. Those calls are wrapped into a set of macros so as not to call Tracy directly. This allows turning...