Table of Contents

Class BatchBase<TDrawInfo>.ResourceBufferInfo

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

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

resourceKey string
staticIndices short[]
indexCount int
vertexCount int

Fields

ResourceKey

The key used to identify the GPU resource.

public readonly string ResourceKey

Field Value

string

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

int

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

int

IsIndexBufferDynamic

Gets the value indicating whether the index buffer is static or dynamic.

public bool IsIndexBufferDynamic { get; }

Property Value

bool

VertexCount

Gets the number indices of the vertex buffer.

public int VertexCount { get; protected set; }

Property Value

int

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 string

The name of key to use to identify the resource

indexCount int

The number of indices contained by the index buffer

vertexCount int

The 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 string

The name of key to use to identify the resource

staticIndices short[]

The value of the indices to upload into the index buffer.

vertexCount int

The number of vertices contained by the vertex buffer

Returns

BatchBase<TDrawInfo>.ResourceBufferInfo