Skip to content

GraphicsAPI reference

Class TextureFormats

Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device

Byte-size rules of texture formats, shared by validation and backends.

C#
public static class TextureFormats

Inheritance

object ← TextureFormats

Methods

ByteCount(TextureFormat, int, int)

Bytes of tightly packed data for a width×height region (rows top to bottom, no padding; compressed formats count whole 4×4 blocks). Depth formats have no CPU layout and throw.

C#
public static int ByteCount(TextureFormat format, int width, int height)

Parameters

format TextureFormat

width int

height int

Returns

int

IsCompressed(TextureFormat)

True for the 4×4 block-compressed formats.

C#
public static bool IsCompressed(TextureFormat format)

Parameters

format TextureFormat

Returns

bool

IsDepth(TextureFormat)

True for D16Unorm, D24UnormS8, D32Float.

C#
public static bool IsDepth(TextureFormat format)

Parameters

format TextureFormat

Returns

bool