Class BatchBase<TDrawInfo>.ResourceBufferInfo
A class containing information on how to build the batch vertex and index buffer.
protected class BatchBase<TDrawInfo>.ResourceBufferInfo
- Inheritance
-
BatchBase<TDrawInfo>.ResourceBufferInfo
- Derived
Constructors
ResourceBufferInfo(string, short[], int, int)
protected ResourceBufferInfo(string resourceKey, short[] staticIndices, int indexCount, int vertexCount)
Parameters
Fields
ResourceKey
The key used to identify the GPU resource.
public readonly string ResourceKey
Field Value
StaticIndices
Gets or sets the static indices to use for the index buffer.
public short[] StaticIndices
Field Value
- short[]
Properties
BatchCapacity
The initial number of draw calls that can be batched at one time.
public int BatchCapacity { get; set; }
Property Value
Remarks
Data structure will adjust their size when needed if capacity is not sufficient
IndexCount
Gets the number indices of the index buffer.
public int IndexCount { get; }
Property Value
IsIndexBufferDynamic
Gets the value indicating whether the index buffer is static or dynamic.
public bool IsIndexBufferDynamic { get; }
Property Value
VertexCount
Gets the number indices of the vertex buffer.
public int VertexCount { get; protected set; }
Property Value
Methods
CreateDynamicIndexBufferInfo(string, int, int)
Create the buffer resource information for a batch having both a dynamic index buffer and vertex buffer.
public static BatchBase<TDrawInfo>.ResourceBufferInfo CreateDynamicIndexBufferInfo(string resourceKey, int indexCount, int vertexCount)
Parameters
resourceKey
stringThe name of key to use to identify the resource
indexCount
intThe number of indices contained by the index buffer
vertexCount
intThe number of vertices contained by the vertex buffer
Returns
- BatchBase<TDrawInfo>.ResourceBufferInfo
CreateStaticIndexBufferInfo(string, short[], int)
Create the buffer resource information for a batch having a dynamic vertex buffer but a static index buffer.
public static BatchBase<TDrawInfo>.ResourceBufferInfo CreateStaticIndexBufferInfo(string resourceKey, short[] staticIndices, int vertexCount)
Parameters
resourceKey
stringThe name of key to use to identify the resource
staticIndices
short[]The value of the indices to upload into the index buffer.
vertexCount
intThe number of vertices contained by the vertex buffer
Returns
- BatchBase<TDrawInfo>.ResourceBufferInfo