Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    Buffer.Typed Class

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

    Typed buffer helper methods.

    System.Object → Buffer.Typed
    Derived from Buffer.Typed:

    public static class Typed
    Remarks

    Example in HLSL: Buffer<float4>.

    Name Description
    Methods
    New(GraphicsDevice, DataPointer, PixelFormat, Boolean, GraphicsResourceUsage)

    Creates a new Typed buffer Default uasge.

    New(GraphicsDevice, Int32, PixelFormat, Boolean, GraphicsResourceUsage)

    Creates a new Typed buffer Default uasge.

    New<T>(GraphicsDevice, T[], PixelFormat, Boolean, GraphicsResourceUsage)

    Creates a new Typed buffer Default uasge.

    | Improve this Doc View Source

    Methods


    New(GraphicsDevice, DataPointer, PixelFormat, Boolean, GraphicsResourceUsage)

    Creates a new Typed buffer Default uasge.

    public static Buffer New(GraphicsDevice device, DataPointer value, PixelFormat viewFormat, bool isUnorderedAccess = false, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
    Parameters
    Type Name Description
    GraphicsDevice device

    The GraphicsDevice.

    DataPointer value

    The value to initialize the Typed buffer.

    PixelFormat viewFormat

    The view format of the buffer.

    System.Boolean isUnorderedAccess

    if set to true this buffer supports unordered access (RW in HLSL).

    GraphicsResourceUsage usage

    The usage of this resource.

    Returns
    Type Description
    Buffer

    A Typed buffer


    New(GraphicsDevice, Int32, PixelFormat, Boolean, GraphicsResourceUsage)

    Creates a new Typed buffer Default uasge.

    public static Buffer New(GraphicsDevice device, int count, PixelFormat viewFormat, bool isUnorderedAccess = false, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
    Parameters
    Type Name Description
    GraphicsDevice device

    The GraphicsDevice.

    System.Int32 count

    The number of data with the following viewFormat.

    PixelFormat viewFormat

    The view format of the buffer.

    System.Boolean isUnorderedAccess

    if set to true this buffer supports unordered access (RW in HLSL).

    GraphicsResourceUsage usage

    The usage.

    Returns
    Type Description
    Buffer

    A Typed buffer


    New<T>(GraphicsDevice, T[], PixelFormat, Boolean, GraphicsResourceUsage)

    Creates a new Typed buffer Default uasge.

    public static Buffer<T> New<T>(GraphicsDevice device, T[] value, PixelFormat viewFormat, bool isUnorderedAccess = false, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
        where T : struct
    Parameters
    Type Name Description
    GraphicsDevice device

    The GraphicsDevice.

    T[] value

    The value to initialize the Typed buffer.

    PixelFormat viewFormat

    The view format of the buffer.

    System.Boolean isUnorderedAccess

    if set to true this buffer supports unordered access (RW in HLSL).

    GraphicsResourceUsage usage

    The usage of this resource.

    Returns
    Type Description
    Buffer<T>

    A Typed buffer

    Type Parameters
    Name Description
    T

    Type of the Typed buffer to get the sizeof from


    • Improve this Doc
    • View Source
    In This Article

    Back to top

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