TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface IBufferFactory in Tinman.Terrain.Rendering

Base interface for classes that create buffer resources for rendering.

interface IBufferFactory base of BufferFactory

Attributes

CanCreateStructuredBuffer

Can this graphics context be used to create IGpuBuffer resources?

property CanCreateStructuredBuffer { get }
type bool
value true if this graphics context supports structured buffers,
false if not.

Methods

CreateIndexBuffer

Creates an IIndexBuffer object with Dynamic or Mappable access, depending on the given buffer flags.

[OwnerReturn]
method CreateIndexBuffer (int32 capacity, GpuBufferFlags flags)
type IIndexBuffer
params capacity [>0] The capacity of the index buffer, in vertex indices.
  flags The buffer flags.
returns [not-null] The IIndexBuffer object.

Exceptions:

CreateIndexBufferStatic

Creates an IIndexBuffer object with Static access.

[OwnerReturn]
method CreateIndexBufferStatic (int32[] indices, int32 offset = 0, int32 count = 0)
type IIndexBuffer
params indices [not-null] The index buffer content.
  offset [>=0] Offset to first vertex index in indices. Defaults to 0.
  count [>=0] Total number of vertex indices. If 0, all remaining vertex indices will be used. Defaults to 0.
returns [not-null] The IIndexBuffer object.

See also:

ResourceAccessPattern.Static

Exceptions:

CreateStructuredBuffer

Creates an IGpuBuffer object with Dynamic or Mappable access, depending on the given buffer flags.

[OwnerReturn]
method CreateStructuredBuffer (int32 elementSize, int32 capacity, GpuBufferFlags flags)
type IGpuBuffer
params elementSize [>=0] The element size of the structured buffer, see ElementSize. If 0, the element size will be inferred from the given behaviour flags. Set elementSize to 0 and flags to None or Update in order to create a buffer with unspecified structure, to be used as a raw byte buffer.
  capacity [>0] The capacity of the structured buffer, see Capacity.
  flags The buffer flags.
returns [not-null] The IGpuBuffer object.

See also:

CanCreateStructuredBuffer

Exceptions:

CreateStructuredBufferStatic

Creates an IGpuBuffer object with Static access.

[OwnerReturn]
method CreateStructuredBufferStatic (int32 elementSize, ByteBuffer content)
type IGpuBuffer
params elementSize [>=0] The element-size of the structured buffer, see ElementSize. Set to 0 in order to create a buffer with unspecified structure, to be used as a raw byte buffer.
  content [not-null] The buffer contents.
returns [not-null] The IGpuBuffer object.

Remarks:

The capacity (see Capacity) of the returned structured buffer is equal to floor(BS/ES), where BS is the buffer size (see Remaining) and ES is the element size (see elementSize). If ES is zero, the capacity of the structured buffer is equal to the buffer size BS.

See also:

CanCreateStructuredBuffer

Exceptions:

CreateVertexBuffer

Creates an IVertexBuffer object with Dynamic or Mappable access, depending on the given buffer flags.

[OwnerReturn]
method CreateVertexBuffer (VertexElements format, int32 capacity, GpuBufferFlags flags)
type IVertexBuffer
params format [not-null] The vertex format.
  capacity [>0] The capacity of the vertex buffer, in vertices.
  flags The buffer flags.
returns [not-null] The IVertexBuffer object.

Exceptions:

CreateVertexBufferStatic

Creates an IVertexBuffer object with Static access.

[OwnerReturn]
method CreateVertexBufferStatic (VertexElements format, ByteBuffer content)
type IVertexBuffer
params format [not-null] The vertex buffer format.
  content [not-null] The vertex buffer contents.
returns [not-null] The IVertexBuffer object.

Remarks:

The capacity (see Capacity) of the returned vertex buffer is equal to floor(BS/VS), where BS is the buffer size (see Remaining) and VS is the vertex size (see SizeAligned).

Exceptions:

ValidateStructuredBuffer

Validates if a structured buffer can be created using the given arguments.

method ValidateStructuredBuffer (int32 elementSize, int32 capacity, GpuBufferFlags flags)
type bool
params elementSize The element size of the structured buffer, see ElementSize. If 0, the element size will be inferred from the given behaviour flags. Set elementSize to 0 and flags to None or Update in order to create a buffer with unspecified structure, to be used as a raw byte buffer.
  capacity The capacity of the structured buffer, see Capacity.
  flags The buffer flags.
returns true if a structured buffer may be created (either static or dynamic),
false if the creation of such structured buffers is not supported.

ValidateVertexElement

Validates if the given vertex element may be used to create vertex buffers.

method ValidateVertexElement (VertexElement element)
type bool
params element [not-null] The vertex element.
returns true if element may be used to create vertex buffers,
false if such vertex elements are not supported.