ScreenQuad

Description

sealed class Tinman.Engine.Rendering.Util.ScreenQuad

Derived from

ResourceBase abstract
IRenderable

A screen-aligned quadrilateral in clip-space.

The vertices of the quadrilateral are defined as follows:

Y+        2-----3   #0 := (-1, -1, N), bottom-left
^         |     |   #1 := (+1, -1, N), bottom-right
|         |     |   #2 := (-1, +1, N), top-left
+--> X+   0-----1   #3 := (+1, +1, N), top-right

where N is the Z-coordinate in clip-space of the near clipping plane (see IGraphicsContext.IsNearAtZero).

Public / Constants

Handle


public static readonly attribute Handle → (IResourceHandle)

The resource handle.

See also

ScreenQuad

Public / Constructors

Screen​Quad


public constructor ScreenQuad → (2)

context in : IGraphicsContext

[not-null]
The graphics context to use.

instances opt : IVertexBuffer own = null

Optional instance buffer to use.

Creates a new instance of ScreenQuad.

Instead of using this constructor, you may consider using Handle instead.

RenderException

If a graphics subsystem error has occurred.

Public / Methods

Render

2 overloads


public method Render2 → (2)

instanceCount in : int32

The number of instances to render or 0 to draw regular geometry.

firstInstance opt : int32 = 0

The first instance to render.

Renders the screen quad.

Public / Attributes

Buffer


public attribute Buffer → (get)

value : IGeometryBuffer

[not-null]
The geometry buffer.

The geometry buffer that is used by this screen quad.