Class View

Namespace
Elegy.RenderSystem.Objects
Assembly
Elegy.RenderSystem.dll

A renderable view.

public class View : IDisposable
Inheritance
View
Implements
Inherited Members

Fields

OnRender

Called when this view is being rendered.

public Action<CommandList> OnRender

Field Value

Action<CommandList>

Properties

CameraBuffer

public DeviceBuffer CameraBuffer { get; }

Property Value

DeviceBuffer

DepthTexture

Depth buffer for depth testing.

public Texture DepthTexture { get; set; }

Property Value

Texture

Framebuffer

Framebuffer associated with TargetSwapchain for displaying the view onto the window. In the case of a custom render target, it's just a framebuffer to perform post-processing on.

public Framebuffer Framebuffer { get; }

Property Value

Framebuffer

Mask

The render mask.

public int Mask { get; set; }

Property Value

int

PerViewSet

public ResourceSet PerViewSet { get; }

Property Value

ResourceSet

Projection

Projection matrix of this view.

public Matrix4x4 Projection { get; set; }

Property Value

Matrix4x4

RenderFramebuffer

Framebuffer associated with ViewTexture and DepthTexture for rendering.

public Framebuffer RenderFramebuffer { get; }

Property Value

Framebuffer

RenderSize

Render output size in pixels.

public Vector2I RenderSize { get; set; }

Property Value

Vector2I

TargetSwapchain

The swapchain associated with the Window. If that is null, this is null too.

public Swapchain? TargetSwapchain { get; }

Property Value

Swapchain

TargetTexture

The texture associated with either the Window or a custom render target. Doesn't have a depth buffer, meant to be a target of post-processing.

public Texture? TargetTexture { get; }

Property Value

Texture

Transform

Transformation matrix of this view.

public Matrix4x4 Transform { get; set; }

Property Value

Matrix4x4

ViewTexture

The texture to render into before post-processing and displaying it on the window.

public Texture ViewTexture { get; set; }

Property Value

Texture

Window

The native window associated with this view.

public IWindow? Window { get; }

Property Value

IWindow

WindowSet

ViewTexture + a sampler object.

public ResourceSet WindowSet { get; set; }

Property Value

ResourceSet

Methods

Dispose()

Disposes of all resources.

public void Dispose()

UpdateBuffers(CommandList)

Updates buffers on the GPU.

public void UpdateBuffers(CommandList commands)

Parameters

commands CommandList