Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    GraphicsResourceAllocatorExtensions Class

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

    Extensions for the GraphicsResourceAllocator.

    System.Object → GraphicsResourceAllocatorExtensions
    Derived from GraphicsResourceAllocatorExtensions:

    public static class GraphicsResourceAllocatorExtensions
    Name Description
    Methods
    GetTemporaryTexture2D(GraphicsResourceAllocator, TextureDescription)

    Gets a Texture output for the specified description.

    GetTemporaryTexture2D(GraphicsResourceAllocator, Int32, Int32, PixelFormat, MipMapCount, TextureFlags, Int32)

    Gets a Texture output for the specified description.

    GetTemporaryTexture2D(GraphicsResourceAllocator, Int32, Int32, PixelFormat, TextureFlags, Int32)

    Gets a Texture output for the specified description with a single mipmap.

    | Improve this Doc View Source

    Methods


    GetTemporaryTexture2D(GraphicsResourceAllocator, TextureDescription)

    Gets a Texture output for the specified description.

    public static Texture GetTemporaryTexture2D(this GraphicsResourceAllocator allocator, TextureDescription description)
    Parameters
    Type Name Description
    GraphicsResourceAllocator allocator

    The allocator.

    TextureDescription description

    The description.

    Returns
    Type Description
    Texture

    A new instance of Texture class.


    GetTemporaryTexture2D(GraphicsResourceAllocator, Int32, Int32, PixelFormat, MipMapCount, TextureFlags, Int32)

    Gets a Texture output for the specified description.

    public static Texture GetTemporaryTexture2D(this GraphicsResourceAllocator allocator, int width, int height, PixelFormat format, MipMapCount mipCount, TextureFlags flags = TextureFlags.ShaderResource | TextureFlags.RenderTarget, int arraySize = 1)
    Parameters
    Type Name Description
    GraphicsResourceAllocator allocator

    The allocator.

    System.Int32 width

    The width.

    System.Int32 height

    The height.

    PixelFormat format

    Describes the format to use.

    MipMapCount mipCount

    Number of mipmaps, set to true to have all mipmaps, set to an int >=1 for a particular mipmap count.

    TextureFlags flags

    Sets the texture flags (for unordered access...etc.)

    System.Int32 arraySize

    Size of the texture 2D array, default to 1.

    Returns
    Type Description
    Texture

    A new instance of Texture class.


    GetTemporaryTexture2D(GraphicsResourceAllocator, Int32, Int32, PixelFormat, TextureFlags, Int32)

    Gets a Texture output for the specified description with a single mipmap.

    public static Texture GetTemporaryTexture2D(this GraphicsResourceAllocator allocator, int width, int height, PixelFormat format, TextureFlags flags = TextureFlags.ShaderResource | TextureFlags.RenderTarget, int arraySize = 1)
    Parameters
    Type Name Description
    GraphicsResourceAllocator allocator

    The allocator.

    System.Int32 width

    The width.

    System.Int32 height

    The height.

    PixelFormat format

    Describes the format to use.

    TextureFlags flags

    Sets the texture flags (for unordered access...etc.)

    System.Int32 arraySize

    Size of the texture 2D array, default to 1.

    Returns
    Type Description
    Texture

    A new instance of Texture class.


    • Improve this Doc
    • View Source
    In This Article

    Back to top

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