Click or drag to resize
Ab4d.SharpEngine logo

VulkanDeviceExecuteOnMainThreadAfterFrameRendered Method

ExecuteOnMainThreadAfterFrameRendered executes the specified action on the main thread (the same thread the VulkanDevice was created on) and after the rendering of the current frame is complete and the GPU resources for that frame are no longer used. If this is called on the main thread and if the current frame is already fully rendered (for example after calling WaitUntilIdle, then the action is immediately executed, otherwise the action is saved and it will be executed when on the main thread and after the frame is rendered. This method can be called from any thread.

Namespace: Ab4d.SharpEngine.Vulkan
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public void ExecuteOnMainThreadAfterFrameRendered(
	Action action
)

Parameters

action  Action
Action to execute
Remarks

ExecuteOnMainThreadAfterFrameRendered executes the specified action on the main thread (the same thread the VulkanDevice was created on) and after the rendering of the current frame is complete and the GPU resources for that frame are no longer used.

If this is called on the main thread and if the current frame is already fully rendered (for example after calling WaitUntilIdle, then the action is immediately executed, otherwise the action is saved and it will be executed when on the main thread and after the frame is rendered.

This method can be called from any thread.

The action must never call the same method that called ExecuteOnMainThreadAfterFrameRendered because in case when GpuDevice is disposed (or in some other cases) this the action is called immediately and this could then create an infinite loop.

See Also