Table of Contents

Class StrideAdapters

Namespace
Icy.Stride.Rendering
Assembly
IcyUI.Stride.dll

Represents extension methods to adapt Stride types to library interfaces.

public static class StrideAdapters
Inheritance
StrideAdapters
Inherited Members

Methods

Draw(SpriteBatch, Texture, in TextureRenderingOptions)

Performs texture drawing with specified rendering options using an instance of the SpriteBatch class.

public static void Draw(this SpriteBatch spriteBatch, Texture texture, in TextureRenderingOptions options)

Parameters

spriteBatch SpriteBatch

An instance of the SpriteBatch to draw texture with.

texture Texture

An instance of the Texture to render.

options TextureRenderingOptions

Options for texture drawing.

Unwrap(ITexture)

Tries to unwrap an instance of the texture that has been wrapped using Wrap(Texture, RenderContext?).

public static Texture Unwrap(this ITexture texture)

Parameters

texture ITexture

An instance of the ITexture that has been made by calling Wrap(Texture, RenderContext?).

Returns

Texture

An instance of the Texture that has been wrapped to create texture.

Exceptions

InvalidOperationException

Occurs when texture wasn't wrapped using Wrap(Texture, RenderContext?) before.

Wrap(Texture, RenderContext?)

Wraps an instance of the Texture into ITexture interface for library usage.

public static ITexture Wrap(this Texture texture, RenderContext? renderContext = null)

Parameters

texture Texture

An instance of the Texture to wrap.

renderContext RenderContext

The owning RenderContext, if any, whose frame-scoped GraphicsContext the wrapped texture reuses for reading/writing its data (see Icy.Stride.Rendering.TextureAdapter's remarks). Pass this whenever texture may have its data read or written later (e.g. a dynamic font atlas page); omit it for textures that are only ever drawn.

Returns

ITexture

An instance of the ITexture ready for work with the library.