BufferFactory

Description

abstract class Tinman.Terrain.Rendering.BufferFactory

Abstract base class for IBufferFactory implementations.

The default implementations in this class do not support structured buffers. If a subclass wishes to provide support for structured buffers, the following members must be overridden:

Protected / Methods

Compute​Element​Size


[Pure]
protected method ComputeElementSize → (2)

elementSize in : int32

The given element size or 0.

flags in : GpuBufferFlags

The special buffer flags

returns → int32

The effective element size.

Computes the effective element size.

Throw​If​Custom​Semantic


protected static method ThrowIfCustomSemantic → (2)

source in : string

The error source tag.

flags in : GpuBufferFlags

The buffer flags.

Throws a RenderException if the given buffer flags indicate a custom semantic (draw, work, mesh).

RenderException

If flags in indicate a custom semantic.

Throw​If​Invalid

3 overloads


protected method ThrowIfInvalid1 → (2)

source in : string

The error source tag.

format in : VertexElements

[not-null]
The vertex elements.

Throws a RenderException if the given vertex elements are not supported.

RenderException

If one or more elements in format in are not supported.


protected method ThrowIfInvalid2 → (3)

source in : string

The error source tag.

elementSize in : int32

The element size.

data in : ByteBuffer

The buffer data.

Throws a RenderException if the given buffer parameters are unsupported.

RenderException

If the given buffer parameters are not supported.


protected method ThrowIfInvalid3 → (4)

source in : string

The error source tag.

elementSize in : int32

The element size.

capacity in : int32

The capacity in elements.

flags in : GpuBufferFlags

The buffer flags.

Throws a RenderException if the given buffer parameters are unsupported.

RenderException

If the given buffer parameters are not supported.

Protected / Attributes

Structured​Buffer​Sizes


protected abstract attribute StructuredBufferSizes → (get)

value : Vec3I

The minimum required element sizes:
Vec3I.X : GpuBufferFlags.Draw
Vec3I.Y : GpuBufferFlags.Work
Vec3I.Z : GpuBufferFlags.Mesh
An element size of 0 means that the flag is not supported.

Returns the minimum required size for structured buffers.