Click or drag to resize
AB4D logo

DXViewIsWaitingInBackgroundUntilRendered Property

Gets or sets a Boolean value that is used only when PresentationType is set to DirectXImage. In DirectXImage presentation type the DXEngine needs to wait until graphics card finish rendering the scene. Then the engine can inform (invalidate) the WPF's D3DImage that the shared texture is prepared. When IsWaitingInBackgroundUntilRendered property is true (by default) then the CompleteRenderingStep is not waiting on the main thread. Instead the waiting is done on the background thread and when it is completed then the invalidation is done on the main thread. When IsWaitingInBackgroundUntilRendered is false, then the waiting is done on the main thread.

Namespace: Ab3d.DirectX.Controls
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.1.9105.2048
Syntax
C#
public bool IsWaitingInBackgroundUntilRendered { get; set; }

Property Value

Boolean
Remarks

Gets or sets a Boolean value that is used only when PresentationType is set to DirectXImage.

In DirectXImage presentation type the DXEngine needs to wait until graphics card finish rendering the scene. Then the engine can inform (invalidate) the WPF's D3DImage that the shared texture is prepared.

When IsWaitingInBackgroundUntilRendered property is true (by default) then the CompleteRenderingStep is not waiting on the main thread. Instead the waiting is done on the background thread and when it is completed then the invalidation is done on the main thread.

When IsWaitingInBackgroundUntilRendered is false, then the waiting is done on the main thread.

Note that background waiting is not always enabled when IsWaitingInBackgroundUntilRendered is true. For simple scene the waiting is still done on the foreground thread, but when waiting takes more then 3 ms (defined by BackgroundWaitingUntilRenderedThresholdTimeMs), then waiting in background is actually enabled (this can be checked by reading the value of IsWaitingUntilRenderedEnabled property).

To check if DXScene is currently waiting in background for rendering to complete, you can read the value of DXScene.IsCurrentlyWaitingUntilRendered property. To prevent starting rendering a new frame while the previous frame is not yet rendered, the InitializeRenderingStep is checking this value and waiting for the rendering to finish.

Note that when using child views that are created with useMasterRenderingSteps set to true, then the background waiting is disabled.

See Also