GraphicsAPI reference
Class DeviceGraphics
Namespace: MicroEngine.Graphics
Assembly: MicroEngine.dll
Guide: Graphics
The textures of the drawing API (IGraphicsDevice) made on a graphics device of the device contract: each texture is a device texture whose straight-alpha pixels are premultiplied when they are uploaded, and its Filter chooses the sampler it is drawn with. Backends built on a device use it as their Graphics.
public sealed class DeviceGraphics : IGraphicsDeviceInheritance
Implements
Constructors
DeviceGraphics(IGraphicsDevice)
Makes textures on device.
public DeviceGraphics(IGraphicsDevice device)Parameters
device IGraphicsDevice
Properties
DefaultFilter
The filter of textures created without one: CreateTexture, atlases. The engine sets it
from the game settings (TextureFilter, or its presentation’s default sampler) before Game.Load.
Glyph pages of a scalable font follow it too unless the font’s options choose a filter.
public TextureFilter DefaultFilter { get; set; }Property Value
Device
The device the textures live on.
public IGraphicsDevice Device { get; }Property Value
LiveTextures
Textures created and not disposed yet.
public int LiveTextures { get; }Property Value
Methods
CreateTexture(PixelImage, TextureFilter)
Uploads image as a texture sampled with filter. The caller owns the texture and disposes it.
public Texture CreateTexture(PixelImage image, TextureFilter filter)Parameters
image PixelImage
filter TextureFilter
Returns
DisposeAll()
Disposes every texture not disposed yet (the platform is closing).
public void DisposeAll()