Table of Contents

Class TextureResourceManager

Namespace
HelixToolkit.SharpDX
Assembly
HelixToolkit.SharpDX.dll

Use for texture resource sharing between models. It uses texture stream as key for each texture.

Call Register to get(if already exists) or create a new shared texture.

Call Unregister to detach the texture from model. Call detach from SharedTextureResourceProxy achieves the same result.

public sealed class TextureResourceManager : ITextureResourceManager, IDisposable
Inheritance
TextureResourceManager
Implements
Inherited Members

Constructors

TextureResourceManager(Device)

Initializes a new instance of the TextureResourceManager class.

public TextureResourceManager(Device device)

Parameters

device Device

The device.

Properties

Count

public int Count { get; }

Property Value

int

Methods

Dispose()

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

public void Dispose()

Register(TextureModel?)

Registers the specified texture model. This creates mipmaps automatically

public ShaderResourceViewProxy? Register(TextureModel? textureStream)

Parameters

textureStream TextureModel

The texture model.

Returns

ShaderResourceViewProxy

Register(TextureModel?, bool)

Registers the specified material unique identifier.

public ShaderResourceViewProxy? Register(TextureModel? textureModel, bool enableAutoGenMipMap)

Parameters

textureModel TextureModel

The texture model.

enableAutoGenMipMap bool

Enable generate mipmaps automatically

Returns

ShaderResourceViewProxy