Struct MipMapDescription
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
widthintThe width of the mipmap, in texels.
heightintThe height of the mipmap, in texels.
depthintThe depth of the mipmap, in texels.
rowStrideintThe row stride of the mipmap, in bytes.
depthStrideintThe depth stride of the mipmap, in bytes.
widthPackedintThe 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).
heightPackedintThe 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
DepthStride
Depth stride of the mipmap (i.e. number of bytes per depth slice).
public readonly int DepthStride
Field Value
Height
Height of the mipmap, in texels.
public readonly int Height
Field Value
HeightPacked
Height of the mipmap, in blocks.
public readonly int HeightPacked
Field Value
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
RowStride
Row stride of the mipmap (i.e. number of bytes per row).
public readonly int RowStride
Field Value
Width
Width of the mipmap, in texels.
public readonly int Width
Field Value
WidthPacked
Width of the mipmap, in blocks.
public readonly int WidthPacked
Field Value
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
otherMipMapDescriptionAn object to compare with this object.
Returns
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
leftMipMapDescriptionrightMipMapDescription
Returns
operator !=(MipMapDescription, MipMapDescription)
public static bool operator !=(MipMapDescription left, MipMapDescription right)
Parameters
leftMipMapDescriptionrightMipMapDescription