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
deviceDeviceThe device.
Properties
Count
public int Count { get; }
Property Value
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
textureStreamTextureModelThe texture model.
Returns
Register(TextureModel?, bool)
Registers the specified material unique identifier.
public ShaderResourceViewProxy? Register(TextureModel? textureModel, bool enableAutoGenMipMap)
Parameters
textureModelTextureModelThe texture model.
enableAutoGenMipMapboolEnable generate mipmaps automatically