GraphicsAPI reference
Class RenderTarget
Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device
A colour attachment (plus optional depth) that passes render to. Offscreen targets come from CreateRenderTarget and can be sampled through Color and read back. The surface target comes from TryAcquireSurfaceTarget, is valid until the next Present, cannot be sampled and cannot be read back.
public abstract class RenderTarget : GraphicsResource, IDisposableInheritance
object ← GraphicsResource ← RenderTarget
Implements
Inherited Members
GraphicsResource.Dispose(), GraphicsResource.Release(), GraphicsResource.Expire(), GraphicsResource.MarkLost(), GraphicsResource.Device, GraphicsResource.Name, GraphicsResource.Handle, GraphicsResource.IsDisposed, GraphicsResource.IsLost, GraphicsResource.OwnedBy, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
RenderTarget(IGraphicsDevice, in RenderTargetDescription, bool)
Creates the target object.
protected RenderTarget(IGraphicsDevice device, in RenderTargetDescription description, bool isSurface)Parameters
device IGraphicsDevice
description RenderTargetDescription
isSurface bool
Properties
Bounds
The whole target as a rectangle.
public RectI Bounds { get; }Property Value
Color
The colour texture for sampling; null for the surface target. Owned by the target.
public abstract Texture? Color { get; }Property Value
ColorFormat
Colour format: what a pipeline drawing into it must declare.
public TextureFormat ColorFormat { get; }Property Value
DepthFormat
Depth format, or null when the target has no depth texture.
public TextureFormat? DepthFormat { get; }Property Value
Description
Size and formats.
public RenderTargetDescription Description { get; }Property Value
Height
Height in pixels.
public int Height { get; }Property Value
IsSurface
True for the surface (back buffer) target.
public bool IsSurface { get; }Property Value
Width
Width in pixels.
public int Width { get; }