Class ProgressiveRenderingViewport2D

Class Hierarchy
  • KanziObject
  •  └─ Node
  •        └─ Node2D
  •              └─ Viewport2D
  •                    └─ ProgressiveRenderingViewport2D

Progressive rendering viewport 2D is a viewport which splits rendering its scene across multiple frames. Progressive rendering viewport is useful when it is required to render complex scene which can take significant amount of time when rendered normally and thus increasing frame time. Progressive rendering viewport renders parts of the scene frame by frame thus decreasing time required to render the scene per frame.

The way how viewport is rendered is defined by the value of Composer property of the viewport. During the first render call the viewport applies the complete composer tree to render the scene and presents result on the screen. After that viewport applies immediate child composers one by one to render the scene to offscreen render target; one child composer per frame. When all child composers are applied to the scene, the viewport presents result on the screen and starts another round of rendering the scene.

The only supported way to modify properties of the nodes in viewport's subtree is to specify timeline in the Timeline property of the viewport. This timeline is used to animate properties of the viewport subtree. Application of timeline animations to viewport subtree is synchronized with rendering rounds in viewport: timeline animations are applied only when viewport is attached and when viewport starts new rendering round. It is allowed to set new value to Timeline property during viewport's rendering round, but viewport will start applying it instead of previous timeline only when it will start new rendering round. It is also allowed to set empty pointer as the value of Timeline property. In this case viewport will stop playback of current timeline when it will start new rendering round. All other ways to modify property values in viewport's subtree (by using animation players or bindings or state manager or setting property value manually) are not supported and if performed during viewport's rendering round will result in undefined behavior.

Since Kanzi 4.0.0 removed m_resolveTexture field.

Inherits properties and message types from ProgressiveRenderingViewport2DMetadata.

Synopsis

Methods
create()

Creates a progressive rendering layer

ProgressiveRenderingViewport2D.ProgressiveRenderingViewport2D:create(name)

Creates a progressive rendering layer.

Parameters
name (string)

Node name.