Skip to content

Class TextureData

Namespace: Apogee.Content
Assembly: Apogee.Content.dll

A decoded texture ready to upload: the GPU format, the size, and the bytes of every mip level (largest first, each tightly packed).

public sealed class TextureData

Inheritance

object ← TextureData

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

TextureData(string, PixelFormat, int, int, IReadOnlyList<byte[]>, bool, SamplerData)

A decoded texture ready to upload: the GPU format, the size, and the bytes of every mip level (largest first, each tightly packed).

public TextureData(string name, PixelFormat format, int width, int height, IReadOnlyList<byte[]> mips, bool srgb, SamplerData sampler)

Parameters

name string

format PixelFormat

width int

height int

mips IReadOnlyList<byte[]>

srgb bool

sampler SamplerData

Properties

Format

public PixelFormat Format { get; }

Property Value

PixelFormat

Height

public int Height { get; }

Property Value

int

Mips

The bytes of each mip level; level 0 is Width x Height.

public IReadOnlyList<byte[]> Mips { get; }

Property Value

IReadOnlyList<byte[]>

Name

public string Name { get; }

Property Value

string

Sampler

public SamplerData Sampler { get; }

Property Value

SamplerData

Srgb

The colors are sRGB encoded (the format is an sRGB one and the GPU decodes on sampling).

public bool Srgb { get; }

Property Value

bool

Width

public int Width { get; }

Property Value

int