Home -> IDataArrayOutput

Declaration

class IDataArrayOutput;

Description

The IDataArrayOutput interface represents an object which is capable of retrieving content from an IDataArray, and returning the contained data to the application. This is useful when performing compute tasks in shaders, where the computed data needs to be returned to the application. Multiple IDataArrayOutput objects can be attached to the one IDataArray if required. If a counter has been attached to an IDataArray, the counter value can also be captured and retrieved.

ImportantImportant

Only the final state of the target IDataArray can be captured, representing its content when the frame completes drawing. It is not possible to capture intermediate results from a buffer which are changed later in the same frame.

Members

Initialization methods

Name Description
Public member Delete
Schedules the object for deletion. After calling this method, the object will be destroyed after the current frame completes drawing.

Configuration methods

Name Description
Public member SetDetachAfterCapture
Specifies whether this IDataArrayOutput object will be detached after a single frame.
Public member SetArrayCaptureRegion
Specifies the region of the bound data array to capture, and whether any attached counter value should also be captured.

Data methods

Name Description
Public member HasCapturedOutput
Returns true if there is captured data ready to be read from the output buffer
Public member HasCapturedCounterValue
Returns true if there is a captured counter value ready to be read from the output
Public member ClearCapturedOutput
Relases the captured data. Note that this doesn't need to be called to capture a new set of data.
Public member GetEntryCount
Returns the number of captured entries currently stored in the output buffer
Public member GetEntrySizeInBytes
Returns the size in bytes of each captured entry currently stored in the output buffer
Public member ReadBufferData
Attempts to read the requested portion of the captured output buffer and write it to the target buffer
Public member ReadCounterValue
Attempts to read the captured counter value

See also