Click or drag to resize
Ab4d.SharpEngine logo

FrameResources Properties

The FrameResources type exposes the following members.

Properties
 NameDescription
Public propertyFrameNumber Current frame number.
Public propertyImageAvailableSemaphore ImageAvailableSemaphore is used to signal the Submitted queue to wait until either: the SwapChainImage returned by the AcquireNextImage is available for rendering, or Avalonia's UpdateWithSemaphoresAsync has signaled that the image can be used for another frame.
Public propertyInFlightFrameIndex Index of this FrameResources in the SceneView's FrameResources array (in-flight frame index).
Public propertyIsDisposed 
Public propertyIsHandedToConsumer True when this frame was already handed over to the consumer (Avalonia compositor). This is independent of IsRenderFinishedSemaphorePending, because when WaitForSharpEngineToFinishRendering is true, no RenderFinishedSemaphore is signaled at all.
Public propertyIsImageAvailableSemaphoreSignalScheduled True when a signal operation for the ImageAvailableSemaphore has already been submitted (by AcquireNextImage or by Avalonia's UpdateWithSemaphoresAsync). Only when this is true, the semaphore may (and must) be used as a wait semaphore in the next QueueSubmit.
Public propertyIsRenderFinishedSemaphorePending When true, then SharpEngine submitted a queue with RenderFinishedSemaphore set as signal semaphore. NOTE that this semaphore must not be used again in a SubmitQueue call without being waited - this is done when the task returned by UpdateWithSemaphoresAsync (UpdateTask) is completed or by the Present call.
Public propertyIsSubmitted True when SharpEngine submitted a queue for the specified FrameNumber.
Public propertyIsWaitingForConsumer True when this frame is rendered but was not yet handed over to the consumer (Avalonia compositor).
Public propertyRenderFinishedFence RenderFinishedFence is used to check when the submitted queue has finished rendering the image.
Public propertyRenderFinishedSemaphore RenderFinishedSemaphore is used to signal: the Present queue to wait until the Submitted queue has finished rendering the image or signal the Avalonia's UpdateWithSemaphoresAsync method when the rendered scene is ready for presentation.
Public propertySemaphoreGlobalIndex Gets a static integer value that is increase each time semaphores are created. This can be used to when checking if imported semaphores are still valid (because the newly created semaphore handle value can be the same as the old one).
Public propertySkippedFramesCount Number of consecutive frames that were skipped because the consumer did not consume the previously rendered frame. Used to log a warning when the rendering appears to be stuck.
Public propertySwapChainIndex Gets the index of the swap chain image that is currently being rendered. This may be different from the index of this FrameResources in case AcquireNextImage returns the same index as in the previous frame.
Public propertyUpdateTask This can be set to Avalonia's UpdateTask that must be finished before the ImageAvailableSemaphore can be used in QueueSubmit. Also, if IsRenderFinishedSemaphorePending is true, and UpdateTask is null, this means that Avalonia's Render method was not yet called and we must skip rendering SharpEngine's frame to prevent using RenderFinishedSemaphore two times in QueueSubmit. This is set to null when the task is completed.
Public propertyUpdateTaskFrameNumber FrameNumber for which the UpdateTask was created (used for logging and to detect stale tasks).
Top
See Also