class render::RenderTarget

Inherits: RenderProxy

Provides access to internal render target implementation usable only from the render thread.

Public

Constructors

RenderTarget

RenderTarget()

Methods

~RenderTarget

virtual ~RenderTarget() noexcept = default

SetPriority

void SetPriority(i32 priority)

Sets a priority that determines in which orders the render targets the processed.

priority
The priority. Higher value means the target will be rendered sooner.

GetProperties

const RenderTargetProperties &GetProperties() const

Returns properties that describe the render target.

GetUpdateCount

u64 GetUpdateCount() const

Returns a number that increments each time the target is rendered to.

External systems can use this to determine when the target's contents changed.

Internal

Methods

TickUpdateCountInternal

void TickUpdateCountInternal()

Increments the update count, letting other code know that the contents of the render target changed.

ReadAsync

virtual TAsyncOp<SPtr<PixelData>> ReadAsync(GpuCommandBuffer &commandBuffer, u32 colorSurfaceIndex = 0, u32 mipLevel = 0, u32 arrayLayer = 0)

Reads the contents of this render target.

Issues a copy command into the command buffer and returns an async operation that triggers when the data has been read.

commandBuffer
Command buffer to issue copy commands into.
colorSurfaceIndex
Which color surface to read (default 0).
mipLevel
Mip level to read (default 0).
arrayLayer
Array layer to read (default 0).

Returns: Async operation that triggers when the read operation is complete. May retun null PixelData if reading is not supported.

Protected

Fields

mUpdateCount

u64 mUpdateCount

mRenderTargetProperties

RenderTargetProperties mRenderTargetProperties