Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    BatchBase<TDrawInfo>.ResourceBufferInfo Class

    Namespace: Stride.Graphics
    Assembly: Stride.Graphics.dll

    A class containing information on how to build the batch vertex and index buffer.

    System.Object → BatchBase<TDrawInfo>.ResourceBufferInfo
    Derived from BatchBase<TDrawInfo>.ResourceBufferInfo: BatchBase<TDrawInfo>.StaticQuadBufferInfo

    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.

    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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[]
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

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

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation