IRenderTarget

Description

interface Tinman.Engine.Rendering.IRenderTarget

A render target surface.

The BeginEnd methods may only be used between paired IBeginEnd.Begin / IBeginEnd.End of the owning IGraphicsContext.

Public / Methods

Finish


[BeginEnd]
public method Finish → ()

Use of this render target as output (see IGraphicsContext.SetRenderTarget) has finished, it is now going to be used as input for subsequent work, for example rendering or presentation.

This method must be called once after having used this IRenderTarget object as output during one or more render cycles (see IGraphicsContext.SetRenderTarget) and before using it as input for subsequent work, for example rendering or presentation. Reading the current pixel contents via IGraphicsContext.ReadPixels does not count as rendering work.

This method should be called when this render target is no longer active, for example after IGraphicsContext.SetRenderTargetRestore has been called.

Public / Attributes

Format


[Constant]
public attribute Format → (get)

value : RenderTargetFormat

The render target format flags.

Returns the render target format that has been used to create this render target.

Has​Color


[Constant]
public attribute HasColor → (get)

value : bool

true if this render target has a color buffer,
false if not.

Does this render target have a color buffer?

Has​Depth


[Constant]
public attribute HasDepth → (get)

value : bool

true if this render target has a depth buffer,
false if not.

Does this render target have a depth buffer?

Has​Mipmaps


[Constant]
public attribute HasMipmaps → (get)

value : bool

true if this render target has a mipmap chain,
false if not.

Does this render target have a chain of mipmap levels?

Is​Multi​Sample


[Constant]
public attribute IsMultiSample → (get)

value : bool

true if this render target uses multi-sampling,
false if not.

Does this render target use multi-sampling, if available?

Is​Srgb


[Constant]
public attribute IsSrgb → (get)

value : bool

true if this render target uses sRGB compression,
false if not.

Does this render target use sRGB compression?

Size


[Constant]
public attribute Size → (get)

value : Vec2I

The render target size, in pixels.

The size of this render target.

Texture


[Constant]
public attribute Texture → (get)

value : ITexture2D

The texture resource or null if this render target does not have a color target (see RenderTargetFormat.MaskColor) or if this is a swap chain render target (see ISwapChain).

The texture resource that holds the rendered pixels.

The ITexture.Format property of the returned texture will always TextureFormat.A8R8G8B8 and IResource.AccessPattern will be ResourceAccessPattern.Static, which means that ITexture2D.SetTexels cannot be used.

Extensions

Is​Compatible


public static method IsCompatible → (1)

other in : IRenderTarget

The other render target.

returns → bool

true if the render targets are compatible,
false if they are not compatible or other in is null.

Checks if this render target is compatible with the given other in render target.

See also

RenderTargets