RenderTargets

Description

struct Tinman.Engine.Rendering.RenderTargets

Represents a set of render targets that consists of up to eight color buffer targets and an optional depth/stencil buffer target.

All render targets in the set must be compatible (see IRenderTarget.IsCompatible): they must have the same size (see IRenderTarget.Size) and the same multi-sampling setting (see IRenderTarget.IsMultiSample).

Public / Constants

None


public static readonly attribute None → (RenderTargets)

The set of render targets that does not have any color buffer targets and no depth/stencil buffer target.

Start with this value and then use Color and Depth to construct render target sets.

Public / Constructors

For


public static method For → (1)

renderTarget in : IRenderTarget

The render target or null to not use any buffer.

returns → RenderTargets

The resulting set of render targets.

Uses the given color and/or depth buffers of the given render target.

This method starts with None and then calls Color and Depth, passing renderTarget in each time.

Public / Methods

Color


[Pure]
public method Color → (1)

renderTarget in : IRenderTarget

The render target to append or null.

returns → RenderTargets

The resulting set of render targets.

Appends the color buffer of given render target to this set of render targets.

If the given renderTarget in is null, does not have a color buffer (see IRenderTarget.HasColor) or if Count is equal to 8, the method returns this.

Contains


public method Contains → (1)

target in : IRenderTarget

The render target to check.

returns → bool

true if target in is part of this render target set,
false if it is not a part of this set or if it is null.

Checks if the given render target in is contained in this render target set.

Depth


[Pure]
public method Depth → (1)

renderTarget in : IRenderTarget

The render target or null.

returns → RenderTargets

The resulting set of render targets.

Uses the depth buffer of the given render target for this set of render targets.

If the given renderTarget in does not have a depth buffer (see IRenderTarget.HasDepth) or is null, the returned render target set will not have a depth buffer.

Get


[Pure]
public method Get → (1)

index in : int32

The render target index: 0 for the depth target, 1..8 for the color targets.

returns → IRenderTarget

The render target or null if none.

Returns the index in-th render target.

Public / Attributes

Count


public attribute Count → (get)

value : int32

[0..8]
The render target count.

Returns the number of render targets for color output.

Size


public attribute Size → (get)

value : Vec2I

The render target size, in pixels.

The render target size.