Table of Contents

Class GraphicsResourceAllocatorExtensions

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Extensions for the GraphicsResourceAllocator.

public static class GraphicsResourceAllocatorExtensions
Inheritance
GraphicsResourceAllocatorExtensions

Methods

GetTemporaryTexture2D(GraphicsResourceAllocator, TextureDescription)

Gets a Texture output for the specified description.

public static Texture GetTemporaryTexture2D(this GraphicsResourceAllocator allocator, TextureDescription description)

Parameters

allocator GraphicsResourceAllocator

The allocator.

description TextureDescription

The description.

Returns

Texture

A new instance of Texture class.

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

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

allocator GraphicsResourceAllocator

The allocator.

width int

The width.

height int

The height.

format PixelFormat

Describes the format to use.

mipCount MipMapCount

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

flags TextureFlags

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

arraySize int

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

Returns

Texture

A new instance of Texture class.

GetTemporaryTexture2D(GraphicsResourceAllocator, int, int, PixelFormat, TextureFlags, int)

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

allocator GraphicsResourceAllocator

The allocator.

width int

The width.

height int

The height.

format PixelFormat

Describes the format to use.

flags TextureFlags

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

arraySize int

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

Returns

Texture

A new instance of Texture class.