Skip to content

GraphicsAPI reference

Class DeviceTexture

Namespace: MicroEngine.Graphics
Assembly: MicroEngine.dll
Guide: Graphics

A texture of the drawing API backed by a device texture (DeviceGraphics).

C#
public sealed class DeviceTexture : Texture, IDisposable

Inheritance

object ← Texture ← DeviceTexture

Implements

IDisposable

Inherited Members

Texture.CheckDrawable<TTexture>(Texture, IGraphicsDevice), Texture.Update(int, int, int, int, ReadOnlySpan<Color>), Texture.Update(PixelImage, int, int), Texture.Dispose(), Texture.Width, Texture.Height, Texture.IsDisposed, Texture.Device, Texture.Bounds, Texture.SizeInBytes, Texture.Filter, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Properties

Native

The device texture holding the premultiplied pixels.

C#
public Texture Native { get; }

Property Value

Texture

Sampler

The sampler the texture’s filter draws with (clamped at the edges).

C#
public SamplerDescription Sampler { get; }

Property Value

SamplerDescription

Methods

ApplyFilter(TextureFilter)

Applies a new filter on the device; called by Filter when it changes.

C#
protected override void ApplyFilter(TextureFilter filter)

Parameters

filter TextureFilter

Release()

Frees the device resource; called once by Dispose.

C#
protected override void Release()

Upload(int, int, int, int, ReadOnlySpan<Color>)

Sends pixels (exactly width × height, already checked) to the device.

C#
protected override void Upload(int x, int y, int width, int height, ReadOnlySpan<Color> pixels)

Parameters

x int

y int

width int

height int

pixels ReadOnlySpan<Color>