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.
Important
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 | |
|---|---|---|
| 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 | |
|---|---|---|
| SetDetachAfterCapture |
Specifies whether this IDataArrayOutput object will be detached after a single frame.
|
|
| 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 | |
|---|---|---|
| HasCapturedOutput |
Returns true if there is captured data ready to be read from the output buffer
|
|
| HasCapturedCounterValue |
Returns true if there is a captured counter value ready to be read from the output
|
|
| ClearCapturedOutput |
Relases the captured data. Note that this doesn't need to be called to capture a new set of data.
|
|
| GetEntryCount |
Returns the number of captured entries currently stored in the output buffer
|
|
| GetEntrySizeInBytes |
Returns the size in bytes of each captured entry currently stored in the output buffer
|
|
| ReadBufferData |
Attempts to read the requested portion of the captured output buffer and write it to the target buffer
|
|
| ReadCounterValue |
Attempts to read the captured counter value
|