Table of Contents

Struct MipMapDescription

Namespace
Stride.Graphics
Assembly
Stride.dll

Describes a mipmap image.

public readonly struct MipMapDescription : IEquatable<MipMapDescription>
Implements
Extension Methods

Remarks

Mipmaps are a sequence of precomputed textures, each of which is a progressively smaller version of the original texture. These are used in 3D graphics to improve rendering performance and reduce aliasing artifacts. Each of the images in the sequence is called a mipmap level. This structure describes one of those.

Constructors

MipMapDescription(int, int, int, int, int, int, int)

Describes a mipmap image.

public MipMapDescription(int width, int height, int depth, int rowStride, int depthStride, int widthPacked, int heightPacked)

Parameters

width int

The width of the mipmap, in texels.

height int

The height of the mipmap, in texels.

depth int

The depth of the mipmap, in texels.

rowStride int

The row stride of the mipmap, in bytes.

depthStride int

The depth stride of the mipmap, in bytes.

widthPacked int

The width of the mipmap in "blocks".

If the pixel format is not a block-compressed format (like BC1, BC2, etc.), this will be the same as width.

Otherwise, if the format is block-compressed, this parameter represents the number of blocks across the width (usually ~1/4 the width).

heightPacked int

The height of the mipmap in "blocks".

If the pixel format is not a block-compressed format (like BC1, BC2, etc.), this will be the same as height.

Otherwise, if the format is block-compressed, this parameter represents the number of blocks across the height (usually ~1/4 the height).

Remarks

Mipmaps are a sequence of precomputed textures, each of which is a progressively smaller version of the original texture. These are used in 3D graphics to improve rendering performance and reduce aliasing artifacts. Each of the images in the sequence is called a mipmap level. This structure describes one of those.

Fields

Depth

Depth of the mipmap, in texels.

public readonly int Depth

Field Value

int

DepthStride

Depth stride of the mipmap (i.e. number of bytes per depth slice).

public readonly int DepthStride

Field Value

int

Height

Height of the mipmap, in texels.

public readonly int Height

Field Value

int

HeightPacked

Height of the mipmap, in blocks.

public readonly int HeightPacked

Field Value

int

Remarks

If the pixel format is not a block-compressed format (like BC1, BC2, etc.), this will be the same as Height.

Otherwise, if the format is block-compressed, this parameter represents the number of blocks across the height (usually ~1/4 the height).

MipmapSize

Size of the whole mipmap, in bytes.

public readonly int MipmapSize

Field Value

int

RowStride

Row stride of the mipmap (i.e. number of bytes per row).

public readonly int RowStride

Field Value

int

Width

Width of the mipmap, in texels.

public readonly int Width

Field Value

int

WidthPacked

Width of the mipmap, in blocks.

public readonly int WidthPacked

Field Value

int

Remarks

If the pixel format is not a block-compressed format (like BC1, BC2, etc.), this will be the same as Width.

Otherwise, if the format is block-compressed, this parameter represents the number of blocks across the width (usually ~1/4 the width).

Methods

Equals(MipMapDescription)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(MipMapDescription other)

Parameters

other MipMapDescription

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator ==(MipMapDescription, MipMapDescription)

public static bool operator ==(MipMapDescription left, MipMapDescription right)

Parameters

left MipMapDescription
right MipMapDescription

Returns

bool

operator !=(MipMapDescription, MipMapDescription)

public static bool operator !=(MipMapDescription left, MipMapDescription right)

Parameters

left MipMapDescription
right MipMapDescription

Returns

bool