KanziStudio应用程序配置详解

更新时间:2023-07-17 14:09:08 阅读: 评论:0

KanziStudio应⽤程序配置详解
在 C++ 应⽤程序中,使⽤ () 函数。
在 application.cfg 中,使⽤或不使⽤ C++ 应⽤程序设置 Kanzi Studio ⼯程的参数。
While you can configure your Kanzi application in the () function, in application.cfg you can configure some parameters without recompiling your application or even without a C++ application. The configuration you specify
in application.cfg overrides the configuration you specify in ().
For example, in application.cfg you can tell your Kanzi application which kzb file to load, enable performance information in your application, and t how many threads you want to u for loading the application resources.
See .
You can u the application configuration ttings.
GlyphCacheHeight GlyphCacheWidth
GraphicsBackend
GraphicsContextAPI
SurfaceBitsStencil
SurfaceBitsDepthBuffer
SurfaceBitsRed
SurfaceBitsGreen
SurfaceBitsBlue
SurfaceBitsAlpha
SurfaceBitsPadding
SurfaceSamplesAntialiasing
SurfaceSwapBehavior
WindowX
WindowY
WindowWidth
WindowHeight
DefaultDisplayIndex
WindowOrder
WindowStyle
InputEventDevice
Loading
BinaryName
You can t which kzb file or configuration file your Kanzi application loads when you launch your Kanzi application. See .
In application.cfg BinaryName = "name"
In ()configuration.binaryName = "name";
Value nam
e
Path to a single kzb file, or to the binary configuration file listing all kzb files that your Kanzi application loads.
application.cfg example # Loads the kzb file named MyApplication.kzb. BinaryName = "MyApplication.kzb"
application.cfg example
# Loads the binary configuration file MyApplicationKzbs.cfg that lists
# all kzb files that your Kanzi application loads.
BinaryName = "MyApplication.kzb.cfg"
() example // Loads kzb file named MyApplication.kzb.
configuration.binaryName = "MyApplication.kzb";
// Loads the binary configuration file MyApplicationKzbs.cfg that lists // all kzb files that your Kanzi application loads.
configuration.binaryName = "MyApplication.kzb.cfg";
ModuleNames
阿基里斯之踵You can t which plugins your Kanzi application loads when you launch your Kanzi application. In application.cfg ModuleNames= "names"
In ()duleNames = names;
Values
names List of plugins to load.
application.cfg example # Loads the plugin DLL files MyPlugin1.dll and MyPlugin2.dll. ModuleNames
= "MyPlugin1; MyPlugin1"
() example // Loads the plugin DLL files MyPlugin1.dll and MyPlugin2.dll. duleNames = {"MyPlugin1", "MyPlugin1"};
LoadingThreadCount
当⽤户在具有多核处理器的环境中运⾏ Kanzi 应⽤程序时,Kanzi 会⾃动使⽤多个 CPU 内核将 kzb ⽂件中的 GPU 资源加载到 RAM 中。See .
一起飞翔GPU 资源 Kanzi 并⾏加载包括所有类型在内的纹理、着⾊器和⽹格。为将这些资源从 RAM 部署到 GPU 内存并加载预设件模
板,Kanzi 始终使⽤主线程。请参阅、、。
In application.cfg LoadingThreadCount = threads
In ()configuration.loadingThreadCount = threads;
Values
threads Number of CPU cores ud for loading the resources. The default value is 3.丙午岁旦
application.cfg example # Switches off the u of multiple cores for loading your application. # Loads your application resources using the main thread. LoadingThreadCount = 0
# Us six threads to load your application. LoadingThreadCount = 5
() example // Switches off the u of multiple cores for loading your application. // Loads your application resources using the main thread. configuration.loadingThreadCount = 0;
// Us six threads to load your application.
茄子营养
configuration.loadingThreadCount = 5;
MaxPendingResources
You can t the maximum number of resources that the loading threads process at the same time. By increasing the number of resources you can speed up the loading, but at the same time you increa the peak memory u during loading becau you can load more resources to the memory before they are deployed to the GPU.
In application.cfg MaxPendingResources = resources
In ()configuration.maxPendingResources = resources;
Values res
our
ces
The maximum number of resources procesd at the same time by the loading threads. The default value is 0 and ts the maximum number of resources to the number of loading threads +1.
application.cfg example # Sets the maximum number of resources procesd by the loading
# threads to the number of loading threads + 1. This is the default value. MaxPendingResources = 0
# Sets the maximum number of resources procesd by the loading
# threads to 20 resources.
MaxPendingResources = 20
学问的名言() example // Sets the maximum number of resources procesd by the loading
// threads to the number of loading threads + 1. This is the default value. configuration.maxPendingResources = 0;
// Sets the maximum number of resources procesd by the loading
// threads to 20 resources.
configuration.maxPendingResources = 20;
UMemoryMappedLoading
在⽀持内存映射⽂件的操作系统上运⾏ Kanzi 应⽤程序时,您可以为 Kanzi 应⽤程序使⽤的 kzb ⽂件启⽤内存映射加载。您启⽤内存映射加载后,因为它减少了⽂件访问量,所以可缩短 Kanzi 应⽤程序的加载时间。
内存映射⽂件受 Windows、Linux 和 QNX 等操作系统的⽀持。在启⽤内存映射加载前,请检查它是否受运⾏ Kanzi 应⽤程序的平台⽀持。
要检查您的平台是否⽀持内存映射加载,请调⽤ () 函数。如⽀持内存映射加载,函数返回 True,如不⽀持,则返回 Fal。
简易房子
如果您在不⽀持功能的平台上启⽤内存映射加载,Kanzi 会显⽰警告并使⽤常规⽂件访问来加载 kzb ⽂件。In application.cfg UMemoryMappedLoading = value
In ()configuration.uMemoryMappedLoading = value;
Values 0Disable the memory mapped loading. Default value. 1Enable the memory mapped loading.
application.cfg example # Enables the memory mapped loading for the kzb files in your Kanzi application. UMemoryMappedLoading = 1
() example // Enables the memory mapped loading for the kzb files in your Kanzi application. configuration.uMemoryMappedLoading = 1;
Performance
ApplicationIdleState
如果没有输⼊、任务、定时器、动画,⼜或是应⽤程序中没有可以更新渲染的任何内容,Kanzi 会暂停主循环。 See .
当使⽤应⽤程序空闲状态时,请考虑下⾯这些使⽤案例:
如果您的 Kanzi 应⽤程序正在显⽰动画,Kanzi 默认会调节 CPU 运⾏速度以获得最⾼的 FPS。如果没有显⽰任何动画,Kanzi 会将应⽤程序设置为空闲状态。因此,为了节省 CPU 资源和能耗,Kanzi 默认会将最⾼帧速率限制为 60 帧/秒。请使⽤应⽤程序配置来设置您的应⽤程序的最⾼帧速率。 See .
如果您的应⽤程序需要连续调⽤ ,请禁⽤应⽤程序空闲状态。
In application.cfg ApplicationIdleState = value
In ()configuration.applicationIdleStateEnabled = value;
Values 0Disable the application idle state.
1Enable the application idle state. Default value.
application.cfg example # Disables the application idle state. ApplicationIdleState = 0
() example // Disables the application idle state. configuration.applicationIdleStateEnabled = 0;
MaximumFPS
You can limit the number of frames rendered per cond by tting the maximum frame rate.
如果您的 Kanzi 应⽤程序正在显⽰动画,Kanzi 默认会调节 CPU 运⾏速度以获得最⾼的 FPS。如果没有显⽰任何动画,Kanzi 会将应⽤程序设置为空闲状态。因此,为了节省 CPU 资源和能耗,Kanzi 默认会将最⾼帧速率限制为 60 帧/秒。请使⽤应⽤程序配置来设置您的应⽤程序的最⾼帧速率。
See .
In application.cfg MaximumFPS = limit
In ()configuration.frameRateLimit = limit;
Value
limit The maximum frame rate of the application in frames per cond.
application.cfg example # Sets the maximum application frame rate to 32 frames per cond. Maxim
umFPS = 32
# Disables the limit.
MaximumFPS = 0
() example // Sets the maximum application frame rate to 32 frames per cond. configuration.frameRateLimit = 32;
// Disables the limit.
configuration.frameRateLimit = 0;
PerformanceInfoLevel
You can enable the display of 性能 HUD (Performance HUD) that shows the performance information for
your Kanzi application. U the 性能 HUD (Performance HUD) to e how your application performs on target devices and to find performance bottlenecks.
日本相亲
性能 HUD (Performance HUD) shows this performance information for your Kanzi application:
FPS shows the number of frames rendered every cond.
Last Frame shows this information for the last frame:
Time shows the time in milliconds it took to render the frame.
批处理数 (Batch count) shows how many individual draw calls were executed (glDrawElements and glDrawArrays).
You can access the batch count using the Kanzi Engine API by calling ().
Triangle Count shows how many individual triangles were drawn in total during a frame.
You can access the triangle count in the Kanzi Engine API by calling ().
Texture Switches shows how many times a new texture was bound to GPU.
You can access the texture switch count in the Kanzi Engine API by calling ().
FBO Switches shows how many framebuffer objects were bound to GPU. See .
You can access the buffer switch count in the Kanzi Engine API by calling ().
Timeline Clock shows the time in milliconds it took to execute all animations in the application.变化多端的意思
Shader shows how many times a new shader was bound for the newly applied batch and how many individual shader uniforms were nt for the last frame. See .
You can access the shader switch count in the Kanzi Engine API by calling ().
You can access the uniforms nt in the Kanzi Engine API by calling ().
Resource Memory Usage shows an estimated amount of local GPU memory (VRAM) and non-local GPU memory (RAM) that your Kanzi application us.
The values that the 性能 HUD (Performance HUD) shows in the Kanzi Studio 预览 (Preview) and when you run
the Kanzi application on a target device differ becau Kanzi Studio loads and keeps in memory all resources in the application.
See .

本文发布于:2023-07-17 14:09:08,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1085151.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:程序   加载   内存
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图