Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    BufferData Class

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

    Content of a GPU buffer (vertex buffer, index buffer, etc...).

    System.Object → BufferData
    Derived from BufferData:

    [DataContract]
    [ContentSerializer(typeof(DataContentSerializerWithReuse<BufferData>))]
    public class BufferData
    Name Description
    Constructors
    BufferData()
    BufferData(BufferFlags, Byte[])
    Properties
    BufferFlags

    Buffer flags describing the type of buffer.

    Content

    Gets or sets the buffer content.

    StructureByteStride

    The size of the structure (in bytes) when it represents a structured/typed buffer.

    Usage

    Usage of this buffer.

    Methods
    New<T>(BufferFlags, T[])

    Creates a new instance of BufferData from a typed buffer.

    | Improve this Doc View Source

    Constructors


    BufferData()

    public BufferData()

    BufferData(BufferFlags, Byte[])

    public BufferData(BufferFlags bufferFlags, byte[] content)
    Parameters
    Type Name Description
    BufferFlags bufferFlags
    System.Byte[] content
    | Improve this Doc View Source

    Properties


    BufferFlags

    Buffer flags describing the type of buffer.

    public BufferFlags BufferFlags { get; set; }
    Property Value
    Type Description
    BufferFlags

    Content

    Gets or sets the buffer content.

    public byte[] Content { get; set; }
    Property Value
    Type Description
    System.Byte[]

    The buffer content.


    StructureByteStride

    The size of the structure (in bytes) when it represents a structured/typed buffer.

    public int StructureByteStride { get; set; }
    Property Value
    Type Description
    System.Int32

    Usage

    Usage of this buffer.

    public GraphicsResourceUsage Usage { get; set; }
    Property Value
    Type Description
    GraphicsResourceUsage
    | Improve this Doc View Source

    Methods


    New<T>(BufferFlags, T[])

    Creates a new instance of BufferData from a typed buffer.

    public static BufferData New<T>(BufferFlags bufferFlags, T[] content)
        where T : struct
    Parameters
    Type Name Description
    BufferFlags bufferFlags

    The flags indicating the type of buffer

    T[] content

    An array of data

    Returns
    Type Description
    BufferData

    A buffer data.

    Type Parameters
    Name Description
    T

    Type of the element to store in the buffer data.


    Extension Methods

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

    Back to top

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