There are several ways to measure the performance of your Kanzi application.
To view the performance of your Kanzi application in Kanzi Studio, in the Preview enter the Debug mode and select:
glDrawElements and glDrawArrays).kzcRendererGetBatchCount.kzcRendererGetTriangleCount.kzcRendererGetTextureSwitchCount.kzcRendererGetFrameBufferSwitchCount.kzcRendererGetShaderSwitchCount.kzcRendererGetUniformSendCount.kzcRendererGetBufferSwitchCount.Buffer/texture data updates determines how many times new vertex buffer or texture data was uploaded to GPU.
You can access the number in the API by calling kzcRendererGetHeavyweightCallCount.
To view the frame rate of your Kanzi application:
configuration->fpsInfoEnabled = KZ_TRUE;
kzu_preview_system.h interface.struct KzuPreviewSystem* previewSystem; previewSystem = kzaApplicationGetPreviewSystem(application); result = kzuPreviewSystemEnableFeature(previewSystem, KZU_PREVIEW_SYSTEM_FEATURE_HUD); kzsErrorForward(result); result = kzuPreviewSystemSetPreviewOptionInteger(previewSystem, KZU_PREVIEW_SYSTEM_OPTION_PERFORMANCE_HUD, 1); kzsErrorForward(result);
kzuEngineGetFramesPerSecond. You can retrieve Kanzi Engine from the application by calling kzaApplicationGetEngine.In addition to the GPU specific profiling, you can also trigger function call profiling:
configuration->functionCallProfiling = KZ_TRUE;
When enabled, application prints every 100th frame the information from the function call tree and how much time (in milliseconds) specific functions took.
Loading times of resources show how much time the loading of resources and the scene graph in the .kzb used by your Kanzi application takes.
To view loading times of resources in your Kanzi application, enable the profiling in the application framework configuration with:
configuration->loadingTimeProfilingEnabled = KZ_TRUE;
Overdraw visualization shows a lot of intensity in areas where fragments are unnecessarily rendered.
To view overdraw of objects in your Kanzi application:
configuration->overdrawVisualizationEnabled = KZ_TRUE;
To view the animation and layout performance of your Kanzi your application:
configuration->animationVisualizationEnabled = KZ_TRUE;
Switching between framebuffer objects can cause significant performance reduction on some platforms. Conditions when Kanzi renders a layer into a texture can be complex. For example, rotation, scale, or opacity can cause render to texture to occur.
To view if a layer is rendered into a texture, and causing a framebuffer object (FBO) switch, in the Preview enter the Debug mode and select Layer render to texture visualization.
The Preview highlights the layers that are rendered into texture with transparent, orange stripes.
In Kanzi Studio you can see which layers in your applications are transparent, and thus show the content behind them.
To view transparent layers in the Preview enter the Debug mode and select Layer is transparent visualization.
The Preview highlights the transparent areas with transparent, blue stripes.
Note that by default the value of Layer Background Brush Color property of viewport layers is transparent (0, 0, 0, 0), and that the Clear Color does not affect the transparency condition directly.
Preventing overdraw with sorting filters
Setting layers for efficient rendering