BatchBase<TDrawInfo>.ResourceBufferInfo Class
Namespace: Stride.GraphicsAssembly: Stride.Graphics.dll
A class containing information on how to build the batch vertex and index buffer.
protected class ResourceBufferInfo
Name | Description | |
---|---|---|
Constructors | ||
ResourceBufferInfo(String, Int16[], Int32, Int32) | ||
Fields | ||
ResourceKey | The key used to identify the GPU resource. |
|
StaticIndices | Gets or sets the static indices to use for the index buffer. |
|
Properties | ||
BatchCapacity | The initial number of draw calls that can be batched at one time. |
|
IndexCount | Gets the number indices of the index buffer. |
|
IsIndexBufferDynamic | Gets the value indicating whether the index buffer is static or dynamic. |
|
VertexCount | Gets the number indices of the vertex buffer. |
|
Methods | ||
CreateDynamicIndexBufferInfo(String, Int32, Int32) | Create the buffer resource information for a batch having both a dynamic index buffer and vertex buffer. |
|
CreateStaticIndexBufferInfo(String, Int16[], Int32) | Create the buffer resource information for a batch having a dynamic vertex buffer but a static index buffer. |
Constructors
ResourceBufferInfo(String, Int16[], Int32, Int32)
protected ResourceBufferInfo(string resourceKey, short[] staticIndices, int indexCount, int vertexCount)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceKey | |
System.Int16[] | staticIndices | |
System.Int32 | indexCount | |
System.Int32 | vertexCount |
Fields
ResourceKey
The key used to identify the GPU resource.
public readonly string ResourceKey
Field Value
Type | Description |
---|---|
System.String |
StaticIndices
Gets or sets the static indices to use for the index buffer.
public short[] StaticIndices
Field Value
Type | Description |
---|---|
System.Int16[] |
Properties
BatchCapacity
The initial number of draw calls that can be batched at one time.
public int BatchCapacity { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
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
Type | Description |
---|---|
System.Int32 |
IsIndexBufferDynamic
Gets the value indicating whether the index buffer is static or dynamic.
public bool IsIndexBufferDynamic { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
VertexCount
Gets the number indices of the vertex buffer.
public int VertexCount { get; protected set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
CreateDynamicIndexBufferInfo(String, Int32, Int32)
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
Type | Name | Description |
---|---|---|
System.String | resourceKey | The name of key to use to identify the resource |
System.Int32 | indexCount | The number of indices contained by the index buffer |
System.Int32 | vertexCount | The number of vertices contained by the vertex buffer |
Returns
Type | Description |
---|---|
BatchBase.ResourceBufferInfo<> |
CreateStaticIndexBufferInfo(String, Int16[], Int32)
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
Type | Name | Description |
---|---|---|
System.String | resourceKey | The name of key to use to identify the resource |
System.Int16[] | staticIndices | The value of the indices to upload into the index buffer. |
System.Int32 | vertexCount | The number of vertices contained by the vertex buffer |
Returns
Type | Description |
---|---|
BatchBase.ResourceBufferInfo<> |