Table of Contents

Struct MipMapCount

Namespace
Stride.Graphics
Assembly
Stride.dll

A simple wrapper to specify number of mipmaps. Set to true to specify all mipmaps or sets an integer value >= 1 to specify the exact number of mipmaps.

public struct MipMapCount : IEquatable<MipMapCount>
Implements
Inherited Members

Remarks

This structure use implicit conversion:

  • Set to true to specify all mipmaps.
  • Set to false to specify a single mipmap.
  • Set to an integer value >=1 to specify an exact count of mipmaps.

Constructors

MipMapCount(bool)

Initializes a new instance of the MipMapCount struct.

public MipMapCount(bool allMipMaps)

Parameters

allMipMaps bool

if set to true generates all mip maps.

MipMapCount(int)

Initializes a new instance of the MipMapCount struct.

public MipMapCount(int count)

Parameters

count int

The count.

Fields

Auto

Automatic mipmap level based on texture size.

public static readonly MipMapCount Auto

Field Value

MipMapCount

Count

Number of mipmaps.

public readonly int Count

Field Value

int

Remarks

Zero(0) means generate all mipmaps. One(1) generates a single mipmap... etc.

Methods

Equals(MipMapCount)

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

public bool Equals(MipMapCount other)

Parameters

other MipMapCount

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.

Operators

operator ==(MipMapCount, MipMapCount)

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

Parameters

left MipMapCount
right MipMapCount

Returns

bool

implicit operator bool(MipMapCount)

Performs an explicit conversion from MipMapCount to bool.

public static implicit operator bool(MipMapCount mipMap)

Parameters

mipMap MipMapCount

The value.

Returns

bool

The result of the conversion.

implicit operator int(MipMapCount)

Performs an explicit conversion from MipMapCount to int.

public static implicit operator int(MipMapCount mipMap)

Parameters

mipMap MipMapCount

The value.

Returns

int

The count of mipmap (0 means all mipmaps).

implicit operator MipMapCount(bool)

Performs an explicit conversion from bool to MipMapCount.

public static implicit operator MipMapCount(bool mipMapAll)

Parameters

mipMapAll bool

True to generate all mipmaps, false to use a single mipmap.

Returns

MipMapCount

The result of the conversion.

implicit operator MipMapCount(int)

Performs an explicit conversion from int to MipMapCount.

public static implicit operator MipMapCount(int mipMapCount)

Parameters

mipMapCount int

True to generate all mipmaps, false to use a single mipmap.

Returns

MipMapCount

The result of the conversion.

operator !=(MipMapCount, MipMapCount)

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

Parameters

left MipMapCount
right MipMapCount

Returns

bool