PrimitiveWriter

Description

sealed class Tinman.Engine.Rendering.Util.PrimitiveWriter

Helper class for writing indexed graphics primitives to a buffer.

Public / Constructors

PrimitiveWriter


public constructor PrimitiveWriter → ()

Creates a new instance of PrimitiveWriter.

Public / Methods

Begin


public method Begin → (1)

primitive in : Primitive

The primitive type.

Begins a new primitive batch.

Clear


public method Clear → ()

Resets the primitive writer to its initial state.

End


public method End → ()

returns → PrimitiveBatch

The primitive batch or PrimitiveBatch.None if empty.

Finished the current primitive batch.

Index

4 overloads


public method Index1 → (1)

in : int32

The vertex index to append.

Appends indices.


public method Index2 → (2)

in : int32

The vertex index to append.

in : int32

The vertex index to append.

Appends indices.


public method Index3 → (3)

in : int32

The vertex index to append.

in : int32

The vertex index to append.

in : int32

The vertex index to append.

Appends indices.


public method Index4 → (4)

in : int32

The vertex index to append.

in : int32

The vertex index to append.

in : int32

The vertex index to append.

in : int32

The vertex index to append.

Appends indices.

Update


public method Update → (2)

buffer in : IIndexBuffer

[not-null]
The index buffer to update.

bufferIndex opt : int32 = 0

[>=0]
Offset of first index in buffer in to write.

returns → bool

true if buffer in has been updated, false if the given index buffer has not enough capacity.

Updates the given index buffer.

Public / Attributes

IndexCount


public attribute IndexCount → (get)

value : int32

[>=0]
The index count.

Returns the number of indices that have been written so far.