Kanzi 3.9 alpha 1 migration guide¶
Use this migration guide to update Kanzi applications from Kanzi 3.8 to Kanzi 3.9.
Changes to the ForwardingAction class¶
Improved the ForwardingAction class to reduce the need for boilerplate code in derived classes:
Look-up contexts of all binding runtimes are now automatically attached to the associated trigger. The derived classes no longer have to do this.
Look-up contexts of all message binding runtimes are now automatically attached to the forwarded message of the associated trigger. The derived classes no longer have to do this.
In the release notes, see Feature improvements.
Changes to the Node class¶
Removed the trailing
/from thegetRelativePath()returns. For example, instead ofmy/item/, the function now returnsmy/item.Added the leading
/to the values ofNode::PathPropertyand theNode::getPath()returns so that they are valid absolute paths. For example, instead ofScreen/RootPage, the value is now/Screen/RootPage.
Changes to¶
the Performance HUD
Updated the Performance HUD to work with the MainLoopScheduler:
Removed the
showoption fromApplicationProperties::profilingCategoryFilter.Introduced the application property
PerformanceInfoProperties::graphFilterthat is a semicolon-separated list of tasks for which profiling graphs to show in the Performance HUD.
Changes to render passes¶
Introduced the GatherLightsRenderPass and GatherNearestLightsRenderPass render passes. Use these render passes to collect Light nodes for lighting 3D nodes in a scene.
If your application contains render passes that draw nodes using lights, you must add a GatherLightsRenderPass or GatherNearestLightsRenderPass that collects the lights. DrawObjectsRenderPass and DrawObjectsWithMaterialRenderPass no longer collect lights.
For example, in
RenderPassTemplateSharedPtr clearTemplate = RenderPassTemplate::create(CompositionTargetRenderPass::getStaticMetaclass()->getName(), "clear");
RenderPassTemplateSharedPtr drawTemplate = RenderPassTemplate::create(DrawObjectsRenderPass::getStaticMetaclass()->getName(), "draw");
RenderPassTemplateSharedPtr groupTemplate = RenderPassTemplate::create(RenderPass::getStaticMetaclass()->getName(), "group");
groupTemplate->addChild(clearTemplate);
groupTemplate->addChild(drawTemplate);
RenderPassPrefabSharedPtr renderPassPrefab = RenderPassPrefab::create(domain, "Render Pass Prefab", groupTemplate);
add a GatherLightsRenderPass as a parent of the DrawObjectsRenderPass:
RenderPassTemplateSharedPtr clearTemplate = RenderPassTemplate::create(CompositionTargetRenderPass::getStaticMetaclass()->getName(), "clear");
RenderPassTemplateSharedPtr drawTemplate = RenderPassTemplate::create(DrawObjectsRenderPass::getStaticMetaclass()->getName(), "draw");
RenderPassTemplateSharedPtr gatherLightsTemplate = RenderPassTemplate::create(GatherLightsRenderPass::getStaticMetaclass()->getName(), "gatherLights");
RenderPassTemplateSharedPtr groupTemplate = RenderPassTemplate::create(RenderPass::getStaticMetaclass()->getName(), "group");
groupTemplate->addChild(clearTemplate);
groupTemplate->addChild(gatherLightsTemplate);
gatherLightsTemplate->addChild(drawTemplate);
RenderPassPrefabSharedPtr renderPassPrefab = RenderPassPrefab::create(domain, "Render Pass Prefab", groupTemplate);
Changes to the Instantiator node¶
Refactored the Instantiator node. The Instantiator node no longer preserves the local transformation of the node that it instantiates. The instantiation now happens from the instantiated node onwards. See Using the Instantiator node.
To migrate your project to Kanzi 3.9, you may need to move the transformation from the instantiated node to the Instantiator node or add a parent node that you instantiate instead.
Other changes¶
Changes in
kanzi/core:Moved
ScopedRefCountertokanzi/core/util/scoped_ref_counter.hpp.Moved
from_charstokanzi/core/cpp/charconv.hpp.Moved
KZ_NOT_MOVABLE_NOT_COPYABLEandKZ_MOVABLE_BUT_NOT_COPYABLEtokanzi/core/util/macros.hpp.Replaced
kzArrayLengthwithsize(array)defined inkanzi/core/cpp/iterator.hpp.Imported
std::moveto thekanzinamespace.Removed
boost/move/utility.hppinclusion.Removed macros:
KZ_COPY_ASSIGN_REFKZ_RV_REFKZ_MOVE_RETKZ_MOVE_BASEKZ_USE_MOVE_EMULATION
Replaced the
KzuBoundingVolumeandKzuTransformedBoundingVolumeclasses withBoxandOrientedBoundingBoxclasses. If your class derives fromNodeand has overridenNode::getBoundingVolumevirtual function, you must now implement theNode3D::getBoundingBoxfunction. Renamed the related helper functions for rendering bounding boxes inRenderer3D.Moved
ActionArgumentTypetoKzbMemoryParser::ArgumentType.Removed
KzcHashMapandKzcHashSet. Useunordered_mapandunordered_setinstead.Removed
KzcDynamicArray. Usevectorinstead.Removed
KzcMemoryManager. Usevector,new/delete,new[]/delete[]instead.Removed
kzsTimeGetCurrentTimestampandkzsTimeGetCurrentTimeMicroseconds. Usekanzi::Clockorstd::steady_clockinstead.Removed obsolete internal bitmap image loading functions:
imageLoadPVRTCimageLoadETCimageLoadATCimageLoadASTCimageLoadRaw2D
Reworked filters. This table shows the difference in filter classes between Kanzi 3.8 and 3.9.
Kanzi 3.8
Kanzi 3.9
KzuObjectSourceObjectSourceKzuSortObjectSourceSortObjectSourceKzuCombinerObjectSourceCombinerObjectSourceKzuFilterObjectSourceFilterObjectSourceKzuContainsPropertyFilterContainsPropertyFilterKzuFrustumCullFilterFrustumCullFilterKzuLODFilterremoved
KzuObjectTypeFilterObjectTypeFilterKzuPropertyIsEqualFilterPropertyIsEqualFilterKzuTagFilterTagFilter