Class StrideAdapters
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
spriteBatchSpriteBatchAn instance of the SpriteBatch to draw texture with.
textureTextureAn instance of the Texture to render.
optionsTextureRenderingOptionsOptions 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
textureITextureAn instance of the ITexture that has been made by calling Wrap(Texture, RenderContext?).
Returns
Exceptions
- InvalidOperationException
Occurs when
texturewasn't wrapped using Wrap(Texture, RenderContext?) before.
Wrap(Texture, RenderContext?)
public static ITexture Wrap(this Texture texture, RenderContext? renderContext = null)
Parameters
textureTextureAn instance of the Texture to wrap.
renderContextRenderContextThe 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
texturemay have its data read or written later (e.g. a dynamic font atlas page); omit it for textures that are only ever drawn.