TextureAtlasOptions

Description

sealed class Tinman.Terrain.Rendering.TextureAtlasOptions

Derived from

IMemoryConsumption
ISrgb

Provides options for creating instances of TextureAtlas.

The ISrgb.Srgb value depicts the value of TextureAtlas.IsSrgb and defaults to true.

Public / Constructors

Texture​Atlas​Options

2 overloads


public constructor TextureAtlasOptions1 → (1)

factory opt : ITextureFactory = null

The initial texture factory to use.

Creates a new instance of TextureAtlasOptions.


public constructor TextureAtlasOptions2 → (1)

other in : TextureAtlasOptions

[not-null]
The options object to copy from.

Creates a new instance of TextureAtlasOptions.

Public / Methods

Create​Texture​Atlas


[OwnerReturn]
public method CreateTextureAtlas → (1)

pyramid opt : ITexelPyramid own = null

The texel pyramid to allocate as ID 0. If null, no allocation will be performed.

returns → TextureAtlas

The created TextureAtlas instance.

Creates a new instance of TextureAtlas, using the current options.

A texture factory must be specified prior to calling this method (see Factory).

RenderException

If a graphics subsystem error has occurred.

Public / Attributes

Factory


public attribute Factory → (get,set)

value : ITextureFactory

The texture factory or null.

The texture factory to use.

If a texture factory has been specified, additional logic is applied:

Format


public attribute Format → (get,set)

value : TextureFormat

[not-null]
The texture format.

The texture format to use.

Defaults to TextureFormat.A8R8G8B8.

Memory​Consumption​Megabytes


public attribute MemoryConsumptionMegabytes → (get,set)

value : int32

[>=0]
The maximum video RAM usage, in megabytes. Set to 0 to disable the limit.

Specifies the maximum video RAM consumption.

Defaults to 0.

Memory​Consumption​Percent


public attribute MemoryConsumptionPercent → (get,set)

value : int32

[0..100]
The maximum video RAM usage, in percent of available video RAM (see ITextureFactory.AvailableVideoMemory). Set to 0 to disable the limit.

Specifies the maximum video RAM consumption.

Defaults to 0.

Texture​Null​Color


public attribute TextureNullColor → (get,set)

value : int64

The uniform texture color.

Uniform color to use for the special NULL texture, which will be used by TextureAtlas.TileSetup if the given tile is invalid.

The default value is 0 (i.e. transparent black).

Texture​Size


public attribute TextureSize → (get,set)

value : int32

[pow2]
The cache texture size.

The maximum cache texture size.

Defaults to 4096.

Texture​Slice​Count


public attribute TextureSliceCount → (get,set)

value : int32

[>=1]
The texture slice count.

The maximum texture slice count.

Defaults to Maths.MaxInt.

Tile​Count


public attribute TileCount → (get,set)

value : int32

[>0]
The minimum number of cached tiles.

The minimum number of cached tiles.

Defaults to 256.

Tile​Size


public attribute TileSize → (get,set)

value : int32

[pow2]
The tile size.

The tile size.

Defaults to 256.