MipmapLevelTexture

Description

sealed class Tinman.Engine.Rendering.Util.MipmapLevelTexture

Helper class for generating textures that can be used to determine the mipmap level that is sampled by the GPU.

Each mipmap level of the texture is made up of a uniform color. When the mipmap levels are sampled by the GPU, the resulting blend color can be used to indicate the mipmap level.

Public / Constructors

Mipmap​Level​Texture


public constructor MipmapLevelTexture → (1)

size in : int32

[pow2]
The texture size.

Creates a new instance of MipmapLevelTexture.

The default color of each mipmap level is Colors.White.

Public / Methods

Create​Texture


[OwnerReturn]
public method CreateTexture → (1)

factory in : ITextureFactory

[not-null]
The texture factory to use.

returns → ITexture2D

The texture resource.

Creates a new texture resource based on this MipmapLevelTexture object.

RenderException

If a graphics subsystem error has occurred.

Set​Level​Color


public method SetLevelColor → (2)

level in : int32

[0..MipmapLevelTexture.LevelCount-1]
The level color.

color in : int64

The mipmap level color (see Colors).

Specifies the uniform color for the given mipmap level.

The default mipmap level color is Colors.White.

Public / Attributes

Level​Count


public attribute LevelCount → (get)

value : int32

[>=1]
The number of mipmap levels.

Returns the number of mipmap levels.