Kanzi 3.9.4 migration guide¶
Use this migration guide to update Kanzi applications from Kanzi 3.9.3 to Kanzi 3.9.4.
Changes to the Face to Camera properties of 3D nodes¶
Replaced the Face to Camera, Face to Camera is Billboarding, and Face to Camera Cylindrical boolean properties with the Face to Camera Mode enumeration property.
This table lists the changes to the properties and methods in the Constraints class:
Kanzi 3.9.3 |
Kanzi 3.9.4 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Changes in Java API¶
In these Assert functions, changed the type of the error message argument to a callback that returns a string. This prevents redundant string allocation for passing assertions:
TrueNotNullNull
For example, Assert.True call changes from
Assert.True(isValid(), "Error message");
to
Assert.True(isValid(), () -> "Error message");
Changes to text and 2D geometry rendering¶
Kanzi now renders text and all 2D geometry using virtual buffer objects and interleaved vertex buffers instead of rendering from main memory.
Geometry now inherits from GPUResource, which means that it requires access to Domain and the creation of a Geometry object registers into the resource manager. To preserve resources, either create the Geometry object beforehand, or create it as-needed and keep it indefinitely, instead of allocating it from stack.
Kanzi still supports rendering using flat vertex data, but this is not recommended because the Kanzi WebGL port does not support it.
This change simplifies the Geometry interface and removes variations of the class. The change removes these headers:
kanzi/core.ui/graphics2d/geometry_frame.hppkanzi/core.ui/graphics2d/geometry_quad.hppkanzi/core.ui/graphics_backend/gl/geometry_frame.hppkanzi/core.ui/graphics_backend/gl/geometry_gl.hppkanzi/core.ui/graphics_backend/gl/geometry_quad.hppkanzi/core.ui/graphics_backend/nogl/geometry_frame.hppkanzi/core.ui/graphics_backend/nogl/geometry_quad.hppkanzi/core.ui/graphics_backend/spansion/geometry_frame.hppkanzi/core.ui/graphics_backend/spansion/geometry_quad.hpp
Use the kanzi/core.ui/graphics2d/geometry.hpp instead.
Changes in Kanzi Android framework (droidfw)¶
Removed the
handleVisibilityChangedmethod from theKanziSurfaceViewandKanziTextureViewviews. Kanzi Android framework (droidfw) now tracks the effective user-visibility of each connected view, and skips the rendering of the hidden views. See Handling the user-visibility of views.Added a required
Surfaceargument to theKanziViewAdapter.handleSurfaceChangedmethod.Kanzi 3.9.3
Kanzi 3.9.4
void handleSurfaceChanged(int width, int height)void handleSurfaceChanged(Surface surface, int width, int height)
Changes to focus handling¶
Kanzi no longer tries to set keyboard focus to an activating Activity when there is no application focus. To control whether to set focus to an activating Activity:
In an Activity in a Parallel Activity Host set the Focus On Activation (
ParallelActivityHostConcept::FocusOnActivationProperty) property.In an Exclusive Activity Host set the Focus On Activating Activity (
ExclusiveActivityHostConcept::FocusOnActivatingActivityProperty) property.
See Controlling whether to set focus to an activating Activity.
Deprecated these functions:
FocusManager::isFocusScope()andFocusManager::isFocusFence().Use
FocusManager::getFocusScopeType()instead.FocusManager::setFocusScope()andFocusManager::setFocusFence().Use
FocusManager::setFocusScopeType()instead.
Removal of explicit extract pass¶
Kanzi now automatically performs during the layout pass the functionality that was in previous versions handled by an explicit extract pass. This means that Kanzi no longer iterates through the node tree twice.
The improvement introduces the changes in the Node2D and Node3D classes:
Renamed the
onExtract()callback toonTransform().Removed the
extract()function. Callingextract()right afterlayout()is no longer needed.Added the
transform()function for forcing the retransformation of a scene.
Changes to primitive mesh creation functions¶
Kanzi now supports setting the tessellation level of a primitive mesh. This improvement introduces the subdivisions parameter to the Mesh::createBox and Mesh::createPlane functions.
Kanzi 3.9.3 |
Kanzi 3.9.4 |
|---|---|
|
|
|
|
Changes to C++ Code Behind¶
This change is required only for projects that you created with Kanzi version 3.9.3.
In the <Project Name>/Application/CMakeLists.txt file change
set(CodeBehind_lib_dir "${CMAKE_CURRENT_SOURCE_DIR}/../Tool_project/CodeBehind")
to
set(CodeBehind_lib_dir "${CMAKE_CURRENT_SOURCE_DIR}/../Tool_project/CodeBehind/<Project Name>")