Table of Contents

Class TileBatchRendererResource

public sealed class TileBatchRendererResource : IPoolableTileResource, IDisposable
Inheritance
object
TileBatchRendererResource
Implements

Constructors

TileBatchRendererResource(TileBatchRenderer, TileResourceShape)

public TileBatchRendererResource(TileBatchRenderer renderer, TileResourceShape shape)

Parameters

renderer TileBatchRenderer
shape TileResourceShape

Properties

Renderer

public TileBatchRenderer Renderer { get; }

Property Value

TileBatchRenderer

Shape

public TileResourceShape Shape { get; }

Property Value

TileResourceShape

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

IdentityTagFor(int, bool, GraphicsFormat, TileFilterMode)

The identity half of this resource's pool key: every TileBatchRenderer constructor input that TileResourceShape's four cost dimensions do not already cover.

public static ulong IdentityTagFor(int instanceCapacity, bool displaced, GraphicsFormat graphicsFormat, TileFilterMode tileFilterMode = TileFilterMode.Automatic)

Parameters

instanceCapacity int
displaced bool
graphicsFormat GraphicsFormat
tileFilterMode TileFilterMode

Returns

ulong

Remarks

The resolved GraphicsFormat is folded in even though the shape already carries a format dimension, because that dimension goes through ResidencyFormat(GraphicsFormat), and TextureFormat has no sRGB/linear distinction and no complete 1:1 mapping back from GraphicsFormat. Without this fold, two arrays allocated in genuinely different graphics formats could key identically and pool-hit each other. Not reachable while RGBA32 is the only shipped residency, and cheap insurance for the block-compressed paths the resolver already supports.

Park()

public void Park()

ResidencyFormat(GraphicsFormat)

The residency format a TileResourceShape records, as the renderer's own resolved GraphicsFormat - the real allocated format, block-compressed residency included, not the uncompressed format that was requested.

public static TextureFormat ResidencyFormat(GraphicsFormat graphicsFormat)

Parameters

graphicsFormat GraphicsFormat

Returns

TextureFormat